Skip to content

Commit

Permalink
pythongh-91387: Fix tarfile test on WASI (pythonGH-93984)
Browse files Browse the repository at this point in the history
WASI's rmdir() syscall does not like the trailing slash.
  • Loading branch information
tiran authored Jun 18, 2022
1 parent fea1e9b commit dd78aae
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit dd78aae

Please sign in to comment.