mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #23738: Document and test actual keyword parameter names
Also fix signature because os.utime(..., ns=None) is not allowed.
This commit is contained in:
parent
5558d4f2f8
commit
bf19d16950
9 changed files with 73 additions and 31 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue