From 0e702ac537d83eb530dd1e17f45dc6b1568c3061 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 9 May 2024 13:04:10 +0100 Subject: [PATCH] gh-118802: Fix ACL use in test for non-English Windows --- Lib/test/test_os.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 9c9c8536dc7542..9088318600f4c0 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3226,9 +3226,8 @@ def test_stat_inaccessible_file(self): 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)