diff options
author | Martin Panter <vadmium> | 2015-09-09 01:01:13 (GMT) |
---|---|---|
committer | Martin Panter <vadmium> | 2015-09-09 01:01:13 (GMT) |
commit | bf19d169504823c258a9aae4bf61c8df9ff5987f (patch) | |
tree | e7c2737588806aeb3e4b46a0ca1beba7d8c31065 /Lib/test/test_zlib.py | |
parent | 5558d4f2f89b86bb0aab35fff01c2b51f1013f33 (diff) | |
download | cpython-bf19d169504823c258a9aae4bf61c8df9ff5987f.zip cpython-bf19d169504823c258a9aae4bf61c8df9ff5987f.tar.gz cpython-bf19d169504823c258a9aae4bf61c8df9ff5987f.tar.bz2 |
Issue #23738: Document and test actual keyword parameter names
Also fix signature because os.utime(..., ns=None) is not allowed.
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r-- | Lib/test/test_zlib.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index 1daa8f8..53bb2ad 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -222,9 +222,9 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): level = 2 method = zlib.DEFLATED wbits = -12 - memlevel = 9 + memLevel = 9 strategy = zlib.Z_FILTERED - co = zlib.compressobj(level, method, wbits, memlevel, strategy) + co = zlib.compressobj(level, method, wbits, memLevel, strategy) x1 = co.compress(HAMLET_SCENE) x2 = co.flush() dco = zlib.decompressobj(wbits) @@ -232,6 +232,10 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): y2 = dco.flush() self.assertEqual(HAMLET_SCENE, y1 + y2) + # keyword arguments should also be supported + zlib.compressobj(level=level, method=method, wbits=wbits, + memLevel=memLevel, strategy=strategy, zdict=b"") + def test_compressincremental(self): # compress object in steps, decompress object as one-shot data = HAMLET_SCENE * 128 |