summaryrefslogtreecommitdiff
path: root/tests/extmod/zlibd_decompress.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-12 22:50:45 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-12 22:50:45 +0300
commit0be4a7712d0dbba8bf01065457e99a432bdda0ad (patch)
treecff9a9af45ca6e025899c869d53aee6f32adf988 /tests/extmod/zlibd_decompress.py
parentc4a8004933d1ae4da52f175d456d6fbe765c3923 (diff)
tests: Rename zlibd_decompress.py -> uzlib_decompress.py.
To use the actual current name.
Diffstat (limited to 'tests/extmod/zlibd_decompress.py')
-rw-r--r--tests/extmod/zlibd_decompress.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/extmod/zlibd_decompress.py b/tests/extmod/zlibd_decompress.py
deleted file mode 100644
index 4a898f27c..000000000
--- a/tests/extmod/zlibd_decompress.py
+++ /dev/null
@@ -1,31 +0,0 @@
-try:
- import zlib
-except ImportError:
- import uzlib as zlib
-
-PATTERNS = [
- # Packed results produced by CPy's zlib.compress()
- (b'0', b'x\x9c3\x00\x00\x001\x001'),
- (b'a', b'x\x9cK\x04\x00\x00b\x00b'),
- (b'0' * 100, b'x\x9c30\xa0=\x00\x00\xb3q\x12\xc1'),
- (bytes(range(64)), b'x\x9cc`dbfaec\xe7\xe0\xe4\xe2\xe6\xe1\xe5\xe3\x17\x10\x14\x12\x16\x11\x15\x13\x97\x90\x94\x92\x96\x91\x95\x93WPTRVQUS\xd7\xd0\xd4\xd2\xd6\xd1\xd5\xd370426153\xb7\xb0\xb4\xb2\xb6\xb1\xb5\xb3\x07\x00\xaa\xe0\x07\xe1'),
- (b'hello', b'x\x01\x01\x05\x00\xfa\xffhello\x06,\x02\x15'), # compression level 0
-]
-
-for unpacked, packed in PATTERNS:
- assert zlib.decompress(packed) == unpacked
- print(unpacked)
-
-
-# Raw DEFLATE bitstream
-v = b'\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00'
-exp = b"hello"
-out = zlib.decompress(v, -15)
-assert(out == exp)
-print(exp)
-
-# this should error
-try:
- zlib.decompress(b'abc')
-except Exception:
- print("Exception")