gh-118802: Fix ACL use in test for non-English Windows (GH-118831)

(cherry picked from commit 82acc5f211)

Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
Miss Islington (bot) 2024-05-09 15:38:43 +02:00 committed by GitHub
parent c4b853f2a5
commit a98e44a5bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -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)