diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-05 12:07:48 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-05 12:07:48 (GMT) |
commit | 1ab2f14281d9186ea57adb2724da325370f1bc27 (patch) | |
tree | 26fac34295ba0f699e843d3d1f778f240e0565f1 /Lib | |
parent | 841de28035a5808046ab23077163c58b7eb557fe (diff) | |
parent | 3f0ee83f14f2ce2c05360f5ed326844388353b6f (diff) | |
download | cpython-1ab2f14281d9186ea57adb2724da325370f1bc27.zip cpython-1ab2f14281d9186ea57adb2724da325370f1bc27.tar.gz cpython-1ab2f14281d9186ea57adb2724da325370f1bc27.tar.bz2 |
Issue #27164: Merge raw Deflate zdict support from 3.5
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_zlib.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index b3e10c0..4d3611c 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -557,6 +557,15 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): self.assertEqual(dco.unconsumed_tail, b'') self.assertEqual(dco.unused_data, remainder) + # issue27164 + def test_decompress_raw_with_dictionary(self): + zdict = b'abcdefghijklmnopqrstuvwxyz' + co = zlib.compressobj(wbits=-zlib.MAX_WBITS, zdict=zdict) + comp = co.compress(zdict) + co.flush() + dco = zlib.decompressobj(wbits=-zlib.MAX_WBITS, zdict=zdict) + uncomp = dco.decompress(comp) + dco.flush() + self.assertEqual(zdict, uncomp) + def test_flush_with_freed_input(self): # Issue #16411: decompressor accesses input to last decompress() call # in flush(), even if this object has been freed in the meanwhile. |