bpo-40275: Use new test.support helper submodules in tests (GH-21764)
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 0d84ff8..a8f764f 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -6,7 +6,7 @@
from test.support import os_helper
from test.support import TestFailed
from test.support.os_helper import FakePath
-from test import support, test_genericpath
+from test import test_genericpath
from tempfile import TemporaryFile
@@ -287,7 +287,7 @@
os.mkdir(ABSTFN)
self.addCleanup(os_helper.rmtree, ABSTFN)
- with support.change_cwd(ABSTFN):
+ with os_helper.change_cwd(ABSTFN):
os.mkdir("subdir")
os.chdir("subdir")
os.symlink(".", "recursive")
@@ -443,11 +443,11 @@
self.assertPathEqual(test_file_long, ntpath.realpath(test_file_short))
- with support.change_cwd(test_dir_long):
+ with os_helper.change_cwd(test_dir_long):
self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
- with support.change_cwd(test_dir_long.lower()):
+ with os_helper.change_cwd(test_dir_long.lower()):
self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
- with support.change_cwd(test_dir_short):
+ with os_helper.change_cwd(test_dir_short):
self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
def test_expandvars(self):
@@ -673,7 +673,7 @@
# locations below cannot then refer to mount points
#
drive, path = ntpath.splitdrive(sys.executable)
- with support.change_cwd(ntpath.dirname(sys.executable)):
+ with os_helper.change_cwd(ntpath.dirname(sys.executable)):
self.assertFalse(ntpath.ismount(drive.lower()))
self.assertFalse(ntpath.ismount(drive.upper()))