diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-09-17 16:20:55 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-09-17 16:20:55 +0300 |
commit | 9a1c91a10d16b603d57fbc97bc54699acee3f052 (patch) | |
tree | 5ff91788756867f913c6794f1b733f4909691336 | |
parent | 0b4dc4846b603025ee8da4403e87cad7739ac8f7 (diff) | |
download | cpython-git-9a1c91a10d16b603d57fbc97bc54699acee3f052.tar.gz |
Fix test_access_denied in 3.5
-rw-r--r-- | Lib/test/test_os.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 9189a82dea..44c65bf64a 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -440,7 +440,8 @@ class StatAttributeTests(unittest.TestCase): # supports file ACLs. fname = os.path.join(os.environ['TEMP'], self.fname) self.addCleanup(support.unlink, fname) - create_file(fname, b'ABC') + with open(fname, 'xb', 0) as fp: + fp.write(b'ABC') # Deny the right to [S]YNCHRONIZE on the file to # force CreateFile to fail with ERROR_ACCESS_DENIED. DETACHED_PROCESS = 8 |