Bug description:
test_read_only_directory fails on non-English Windows machine.
.\python.bat -m unittest test.test_tempfile.TestMkdtemp.test_read_only_directory test.test_tempfile.TestMkstempInner.test_read_only_directory -v
Running Debug|x64 interpreter...
test_read_only_directory (test.test_tempfile.TestMkdtemp.test_read_only_directory) ... Everyone: No mapping between account names and security IDs was done.
ERROR
test_read_only_directory (test.test_tempfile.TestMkstempInner.test_read_only_directory) ... Everyone: No mapping between account names and security IDs was done.
ERROR
======================================================================
ERROR: test_read_only_directory (test.test_tempfile.TestMkdtemp.test_read_only_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Dawid\Desktop\CODE\cpython\Lib\test\test_tempfile.py", line 337, in test_read_only_directory
subprocess.run(cmd, check=True, stdout=stdout)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dawid\Desktop\CODE\cpython\Lib\subprocess.py", line 692, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['icacls', 'C:\\Users\\Dawid\\AppData\\Local\\Temp\\tmprn_1wtuc', '/deny', 'Everyone:(W)']' returned non-zero exit status 1332.
======================================================================
ERROR: test_read_only_directory (test.test_tempfile.TestMkstempInner.test_read_only_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Dawid\Desktop\CODE\cpython\Lib\test\test_tempfile.py", line 337, in test_read_only_directory
subprocess.run(cmd, check=True, stdout=stdout)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dawid\Desktop\CODE\cpython\Lib\subprocess.py", line 692, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['icacls', 'C:\\Users\\Dawid\\AppData\\Local\\Temp\\tmp750mzmk7', '/deny', 'Everyone:(W)']' returned non-zero exit status 1332.
----------------------------------------------------------------------
Ran 2 tests in 0.081s
FAILED (errors=2)
Simmilar issue:
#118773
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
Bug description:
test_read_only_directory fails on non-English Windows machine.
Simmilar issue:
#118773
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs