Skip to content

Commit 7dedfd3

Browse files
authored
gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (#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.
1 parent 09ea4b8 commit 7dedfd3

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
@@ -737,7 +737,7 @@ def test_access_denied(self):
737737
# denied. See issue 28075.
738738
# os.environ['TEMP'] should be located on a volume that
739739
# supports file ACLs.
740-
fname = os.path.join(os.environ['TEMP'], self.fname)
740+
fname = os.path.join(os.environ['TEMP'], self.fname + "_access")
741741
self.addCleanup(os_helper.unlink, fname)
742742
create_file(fname, b'ABC')
743743
# Deny the right to [S]YNCHRONIZE on the file to

0 commit comments

Comments
 (0)