Skip to content

Commit bb6610e

Browse files
committed
Fix gzip filename test
1 parent b571c13 commit bb6610e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_gzip_compliance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ def test_metadata(self):
348348
self.assertEqual(cmByte, b'\x08') # deflate
349349

350350
try:
351-
expectedname = self.filename.encode('Latin-1') + b'\x00'
351+
expectedname = os.path.basename(self.filename).encode(
352+
'Latin-1') + b'\x00'
352353
expectedflags = b'\x08' # only the FNAME flag is set
353354
except UnicodeEncodeError:
354355
expectedname = b''

0 commit comments

Comments
 (0)