From 1cf777fe62e88005991d48912863e8504934b976 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 18 Jun 2022 19:55:48 +0200 Subject: [PATCH] [3.11] gh-91387: Fix tarfile test on WASI (GH-93984) WASI's rmdir() syscall does not like the trailing slash. (cherry picked from commit dd78aae34bc3c0fcf14b2e7be64e08246ee277cc) Co-authored-by: Christian Heimes --- Lib/test/test_tarfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index f1aed5ccc6b76b..e0389c5dc474f5 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -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('/'))) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy