Visitar URL original
gh-91387: Fix tarfile test on WASI by tiran · Pull Request #93984 · python/cpython · GitHub
Skip to content
Merged
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
gh-91387: Fix tarfile test on WASI
WASI's rmdir() syscall does not like the trailing slash.
  • Loading branch information
tiran committed Jun 18, 2022
commit 438d89c3e4aab90e5f05571e18ad6930f745ece7
2 changes: 1 addition & 1 deletion Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def test_longname_directory(self):
os.mkdir(longdir)
tar.add(longdir)
finally:
os.rmdir(longdir)
os.rmdir(longdir.rstrip("/"))
with tarfile.open(tmpname) as tar:
self.assertIsNotNone(tar.getmember(longdir))
self.assertIsNotNone(tar.getmember(longdir.removesuffix('/')))
Expand Down