[Python-checkins] cpython (3.5): Fix test_access_denied in 3.5

berker.peksag python-checkins at python.org
Sat Sep 17 09:21:11 EDT 2016


https://hg.python.org/cpython/rev/16d4bbda29c2
changeset:   103881:16d4bbda29c2
branch:      3.5
parent:      103878:eabb86463462
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sat Sep 17 16:20:55 2016 +0300
summary:
  Fix test_access_denied in 3.5

files:
  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
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -440,7 +440,8 @@
         # 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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list