Skip to content

Commit 5d47fb1

Browse files
[3.11] gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299) (#109303)
gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299) Fix test_os.test_access_denied() when the TEMP environment variable is equal to the current working directory. Run the test using a different filename, since self.fname already exists in this case. (cherry picked from commit 7dedfd3) Co-authored-by: Victor Stinner <[email protected]>
1 parent abf3a68 commit 5d47fb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_os.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def test_access_denied(self):
726726
# denied. See issue 28075.
727727
# os.environ['TEMP'] should be located on a volume that
728728
# supports file ACLs.
729-
fname = os.path.join(os.environ['TEMP'], self.fname)
729+
fname = os.path.join(os.environ['TEMP'], self.fname + "_access")
730730
self.addCleanup(os_helper.unlink, fname)
731731
create_file(fname, b'ABC')
732732
# Deny the right to [S]YNCHRONIZE on the file to

0 commit comments

Comments
 (0)