diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 0274f791ba79bf..e0fe178cda14be 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1382,9 +1382,9 @@ def test_exist_ok_existing_regular_file(self): @unittest.skipUnless(os.name == 'nt', "requires Windows") def test_win32_mkdir_700(self): - base = os_helper.TESTFN - path1 = os.path.join(os_helper.TESTFN, 'dir1') - path2 = os.path.join(os_helper.TESTFN, 'dir2') + base = support.TESTFN + path1 = os.path.join(support.TESTFN, 'dir1') + path2 = os.path.join(support.TESTFN, 'dir2') # mode=0o700 is special-cased to override ACLs on Windows # There's no way to know exactly how the ACLs will look, so we'll # check that they are different from a regularly created directory. diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index 9fe9d1d651433e..c1fdcea04bb935 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -780,7 +780,7 @@ def test_mode_win32(self): acl = None # First line of result includes our directory if line.startswith(dir): - acl = line.removeprefix(dir).strip() + acl = line[len(dir):].strip() elif line and line[:1].isspace(): acl = line.strip() if acl: