Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
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
2 changes: 1 addition & 1 deletion 2 Lib/test/test_gzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_metadata(self):
self.assertEqual(cmByte, b'\x08') # deflate

try:
expectedname = self.filename.encode('Latin-1') + b'\x00'
expectedname = os.path.basename(self.filename).encode('Latin-1') + b'\x00'
expectedflags = b'\x08' # only the FNAME flag is set
except UnicodeEncodeError:
expectedname = b''
Expand Down
6 changes: 3 additions & 3 deletions 6 Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def test_decompimax(self, source=None, cx=256, dcx=64):
dco = zlib.decompressobj()
bufs = []
cb = combuf
while cb:
while not dco.eof:
#max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, dcx)
self.assertFalse(len(chunk) > dcx,
Expand All @@ -439,7 +439,7 @@ def test_decompressmaxlen(self, flush=False):
dco = zlib.decompressobj()
bufs = []
cb = combuf
while cb:
while not dco.eof:
max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, max_length)
self.assertFalse(len(chunk) > max_length,
Expand All @@ -449,7 +449,7 @@ def test_decompressmaxlen(self, flush=False):
if flush:
bufs.append(dco.flush())
else:
while chunk:
while not dco.eof:
chunk = dco.decompress(b'', max_length)
self.assertFalse(len(chunk) > max_length,
'chunk too big (%d>%d)' % (len(chunk),max_length))
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.