Skip to content

Commit 438d89c

Browse files
committed
pythongh-91387: Fix tarfile test on WASI
WASI's rmdir() syscall does not like the trailing slash.
1 parent fea1e9b commit 438d89c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_tarfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ def test_longname_directory(self):
10311031
os.mkdir(longdir)
10321032
tar.add(longdir)
10331033
finally:
1034-
os.rmdir(longdir)
1034+
os.rmdir(longdir.rstrip("/"))
10351035
with tarfile.open(tmpname) as tar:
10361036
self.assertIsNotNone(tar.getmember(longdir))
10371037
self.assertIsNotNone(tar.getmember(longdir.removesuffix('/')))

0 commit comments

Comments
 (0)