mirror of https://github.com/python/cpython
gh-91387: Fix tarfile test on WASI (GH-93984)
WASI's rmdir() syscall does not like the trailing slash.
This commit is contained in:
parent
fea1e9bc5c
commit
dd78aae34b
|
@ -1031,7 +1031,7 @@ class LongnameTest:
|
|||
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('/')))
|
||||
|
|
Loading…
Reference in New Issue