mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00
Merge: Fix copy-paste mistake in new zlib test.
This commit is contained in:
commit
beb552c97c
1 changed files with 4 additions and 2 deletions
|
@ -528,9 +528,11 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
|
||||||
if size < _4G + 100:
|
if size < _4G + 100:
|
||||||
self.skipTest("not enough free memory, need at least 4 GB")
|
self.skipTest("not enough free memory, need at least 4 GB")
|
||||||
data = b'x' * size
|
data = b'x' * size
|
||||||
|
c = zlib.compressobj(1)
|
||||||
|
d = zlib.decompressobj()
|
||||||
try:
|
try:
|
||||||
self.assertRaises(OverflowError, zlib.compress, data, 1)
|
self.assertRaises(OverflowError, c.compress, data)
|
||||||
self.assertRaises(OverflowError, zlib.decompress, data)
|
self.assertRaises(OverflowError, d.decompress, data)
|
||||||
finally:
|
finally:
|
||||||
data = None
|
data = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue