mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
09ea4b8706
commit
7dedfd36dc
|
@ -737,7 +737,7 @@ class StatAttributeTests(unittest.TestCase):
|
|||
# denied. See issue 28075.
|
||||
# os.environ['TEMP'] should be located on a volume that
|
||||
# supports file ACLs.
|
||||
fname = os.path.join(os.environ['TEMP'], self.fname)
|
||||
fname = os.path.join(os.environ['TEMP'], self.fname + "_access")
|
||||
self.addCleanup(os_helper.unlink, fname)
|
||||
create_file(fname, b'ABC')
|
||||
# Deny the right to [S]YNCHRONIZE on the file to
|
||||
|
|
Loading…
Reference in New Issue