Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Lib/test/test_tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ def test_read_only_directory(self):
with _inside_empty_temp_dir():
probe = os.path.join(tempfile.tempdir, 'probe')
if os.name == 'nt':
cmd = ['icacls', tempfile.tempdir, '/deny', 'Everyone:(W)']
# Use security identifier *S-1-1-0 instead
# of localized "Everyone" to not depend on the locale.
cmd = ['icacls', tempfile.tempdir, '/deny', '*S-1-1-0:(W)']
stdout = None if support.verbose > 1 else subprocess.DEVNULL
subprocess.run(cmd, check=True, stdout=stdout)
else:
Expand All @@ -355,7 +357,9 @@ def test_read_only_directory(self):
self.make_temp()
finally:
if os.name == 'nt':
cmd = ['icacls', tempfile.tempdir, '/grant:r', 'Everyone:(M)']
# Use security identifier *S-1-1-0 instead
# of localized "Everyone" to not depend on the locale.
cmd = ['icacls', tempfile.tempdir, '/grant:r', '*S-1-1-0:(M)']
subprocess.run(cmd, check=True, stdout=stdout)
else:
os.chmod(tempfile.tempdir, oldmode)
Expand Down Expand Up @@ -1747,7 +1751,7 @@ def test_cleanup_with_symlink_to_a_directory(self):
d2.cleanup()

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; flaky, sometimes pollute env on CI")
@unittest.expectedFailureIf(sys.platform in ("android", "linux"), "TODO: RUSTPYTHON; FileNotFoundError: [Errno 2] No such file or directory: '<LONG_PATH>'")
@unittest.expectedFailureIf(sys.platform in ('android', 'linux'), "TODO: RUSTPYTHON; FileNotFoundError: [Errno 2] No such file or directory: '<LONG_PATH>'")
@os_helper.skip_unless_symlink
def test_cleanup_with_symlink_modes(self):
# cleanup() should not follow symlinks when fixing mode bits (#91133)
Expand Down
Loading