summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-06-18 17:55:48 (GMT)
committerGitHub <noreply@github.com>2022-06-18 17:55:48 (GMT)
commitdd78aae34bc3c0fcf14b2e7be64e08246ee277cc (patch)
treefb6ec89901cf73115ca692ceddcf962f931ddc20
parentfea1e9bc5cd081b896b328a035719f7ccbf6843e (diff)
downloadcpython-dd78aae34bc3c0fcf14b2e7be64e08246ee277cc.zip
cpython-dd78aae34bc3c0fcf14b2e7be64e08246ee277cc.tar.gz
cpython-dd78aae34bc3c0fcf14b2e7be64e08246ee277cc.tar.bz2
gh-91387: Fix tarfile test on WASI (GH-93984)
WASI's rmdir() syscall does not like the trailing slash.
-rw-r--r--Lib/test/test_tarfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index f1aed5c..e0389c5 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -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('/')))