File: tests.patch

package info (click to toggle)
python-lz4 0.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 120 kB
  • ctags: 84
  • sloc: ansic: 172; python: 49; makefile: 23
file content (24 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Last-Update: 2014-08-10
Origin: https://github.com/steeve/python-lz4/blob/master/tests/test.py
Forwarded: not-needed
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: add basic test

--- /dev/null
+++ b/tests/test.py
@@ -0,0 +1,15 @@
+import lz4
+import sys
+
+
+import unittest
+import os
+
+class TestLZ4(unittest.TestCase):
+
+    def test_random(self):
+        DATA = os.urandom(128 * 1024) # Read 128kb
+        self.assertEqual(DATA, lz4.loads(lz4.dumps(DATA)))
+
+if __name__ == '__main__':
+    unittest.main()