From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 9 May 2024 13:38:43 +0000 (+0200) Subject: gh-118802: Fix ACL use in test for non-English Windows (GH-118831) X-Git-Tag: v3.13.0b2~252 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a98e44a5bf935a46822c2ea3619eec49dbecbba8;p=thirdparty%2FPython%2Fcpython.git gh-118802: Fix ACL use in test for non-English Windows (GH-118831) (cherry picked from commit 82acc5f2113bffd0ed902851f4ccf5b9be8980b2) Co-authored-by: Steve Dower --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 9c9c8536dc75..9088318600f4 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3226,9 +3226,8 @@ class Win32NtTests(unittest.TestCase): self.skipTest("Unable to create inaccessible file") def cleanup(): - # Give delete permission. We are the file owner, so we can do this - # even though we removed all permissions earlier. - subprocess.check_output([ICACLS, filename, "/grant", "Everyone:(D)"], + # Give delete permission to the owner (us) + subprocess.check_output([ICACLS, filename, "/grant", "*WD:(D)"], stderr=subprocess.STDOUT) os.unlink(filename)