Skip to content

Commit

Permalink
Add some context to the assertion for troubleshooting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 2, 2024
1 parent c94488e commit 87ac08d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/test/test_zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,8 @@ def test_unsupported_names(self):
root = zipfile.Path(zf)
contents = root.iterdir()
assert next(contents).name == 'path?'
assert next(contents).name == 'V: NMS.flac'
item = next(contents)
assert item.name == 'V: NMS.flac', item.name
assert root.joinpath('V: NMS.flac').read_bytes() == b"fLaC..."

def test_backslash_not_separator(self):
Expand All @@ -3326,7 +3327,7 @@ def test_backslash_not_separator(self):
root = zipfile.Path(zf)
(first,) = root.iterdir()
assert not first.is_dir()
assert first.name == 'foo\\bar'
assert first.name == 'foo\\bar', first.name


class DirtyZipInfo(zipfile.ZipInfo):
Expand Down

0 comments on commit 87ac08d

Please sign in to comment.