From: Berker Peksag Date: Sat, 17 Sep 2016 13:20:55 +0000 (+0300) Subject: Fix test_access_denied in 3.5 X-Git-Tag: v3.6.0b2~187^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a1c91a10d16b603d57fbc97bc54699acee3f052;p=thirdparty%2FPython%2Fcpython.git Fix test_access_denied in 3.5 --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 9189a82dea59..44c65bf64a9c 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