Skip to content

Commit bed22ac

Browse files
committed
Expect only basename of file stored in gzip header.
1 parent e3bf6ea commit bed22ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_gzip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def test_metadata(self):
331331
self.assertEqual(cmByte, b'\x08') # deflate
332332

333333
try:
334-
expectedname = self.filename.encode('Latin-1') + b'\x00'
334+
expectedname = os.path.basename(self.filename).encode('Latin-1') + b'\x00'
335335
expectedflags = b'\x08' # only the FNAME flag is set
336336
except UnicodeEncodeError:
337337
expectedname = b''

0 commit comments

Comments
 (0)