diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-05-27 11:20:21 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-05-27 11:20:21 (GMT) |
commit | 6ecfab85d9ec39d6398204f9a4be3a299e88c108 (patch) | |
tree | 5ce5c2565257e9221b7271eeea89328952e558be | |
parent | 9c946bbf2093f6fb85a4bbe68362d87daead6c98 (diff) | |
download | cpython-6ecfab85d9ec39d6398204f9a4be3a299e88c108.zip cpython-6ecfab85d9ec39d6398204f9a4be3a299e88c108.tar.gz cpython-6ecfab85d9ec39d6398204f9a4be3a299e88c108.tar.bz2 |
Issue #5784: Cannot test wbits=0 unless we know we have zlib v1.2.3.5
-rw-r--r-- | Doc/library/zlib.rst | 1 | ||||
-rw-r--r-- | Lib/test/test_zlib.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst index 1e2df00..9cffe27 100644 --- a/Doc/library/zlib.rst +++ b/Doc/library/zlib.rst @@ -160,6 +160,7 @@ The available exception and functions in this module are: must include a zlib header and trailer. * 0: Automatically determine the window size from the zlib header. + Only supported since zlib 1.2.3.5. * −8 to −15: Uses the absolute value of *wbits* as the window size logarithm. The input must be a raw stream with no header or trailer. diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index c537c2a..96cc3a7 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -531,7 +531,6 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): co = zlib.compressobj(1, zlib.DEFLATED, 15) zlib15 = co.compress(HAMLET_SCENE) + co.flush() self.assertEqual(zlib.decompress(zlib15, 15), HAMLET_SCENE) - self.assertEqual(zlib.decompress(zlib15, 0), HAMLET_SCENE) self.assertEqual(zlib.decompress(zlib15, 32 + 15), HAMLET_SCENE) with self.assertRaisesRegexp(zlib.error, 'invalid window size'): zlib.decompress(zlib15, 14) @@ -545,7 +544,6 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): zlib9 = co.compress(HAMLET_SCENE) + co.flush() self.assertEqual(zlib.decompress(zlib9, 9), HAMLET_SCENE) self.assertEqual(zlib.decompress(zlib9, 15), HAMLET_SCENE) - self.assertEqual(zlib.decompress(zlib9, 0), HAMLET_SCENE) self.assertEqual(zlib.decompress(zlib9, 32 + 9), HAMLET_SCENE) dco = zlib.decompressobj(32 + 9) self.assertEqual(dco.decompress(zlib9), HAMLET_SCENE) |