Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/test/test_bz2.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,10 @@ def testEOFError(self):
@bigmemtest(size=_4G + 100, memuse=3.3)
def testDecompress4G(self, size):
# "Test BZ2Decompressor.decompress() with >4GiB input"
blocksize = 10 * 1024 * 1024
blocksize = min(10 * 1024 * 1024, size)
block = random.randbytes(blocksize)
try:
data = block * (size // blocksize + 1)
data = block * ((size-1) // blocksize + 1)
compressed = bz2.compress(data)
bz2d = BZ2Decompressor()
decompressed = bz2d.decompress(compressed)
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_lzma.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ def test_compressor_bigmem(self, size):
@bigmemtest(size=_4G + 100, memuse=3)
def test_decompressor_bigmem(self, size):
lzd = LZMADecompressor()
blocksize = 10 * 1024 * 1024
blocksize = min(10 * 1024 * 1024, size)
block = random.randbytes(blocksize)
try:
input = block * (size // blocksize + 1)
input = block * ((size-1) // blocksize + 1)
cdata = lzma.compress(input)
ddata = lzd.decompress(cdata)
self.assertEqual(ddata, input)
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,10 +989,10 @@ def testEOFError(self):
@bigmemtest(size=_4G + 100, memuse=3.3)
def testDecompress4G(self, size):
# "Test zlib._ZlibDecompressor.decompress() with >4GiB input"
blocksize = 10 * 1024 * 1024
blocksize = min(10 * 1024 * 1024, size)
block = random.randbytes(blocksize)
try:
data = block * (size // blocksize + 1)
data = block * ((size-1) // blocksize + 1)
compressed = zlib.compress(data)
zlibd = zlib._ZlibDecompressor()
decompressed = zlibd.decompress(compressed)
Expand Down