diff options
| author | Hai Shi <shihai1992@gmail.com> | 2020-08-07 23:18:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 17:18:38 +0200 |
| commit | 598a951844122678de2596dbc1e0e09e2be65fd2 (patch) | |
| tree | 23e7f7765fd015e838382e443f39269a2745fbc4 /Lib/test/test_ntpath.py | |
| parent | 46e19b61d31ba99f049258efa4ff1334856a3643 (diff) | |
| download | cpython-git-598a951844122678de2596dbc1e0e09e2be65fd2.tar.gz | |
bpo-40275: Use new test.support helper submodules in tests (GH-21764)
Diffstat (limited to 'Lib/test/test_ntpath.py')
| -rw-r--r-- | Lib/test/test_ntpath.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 0d84ff8bce..a8f764f48c 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -6,7 +6,7 @@ import warnings 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 @@ class TestNtpath(NtpathTestCase): 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 @@ class TestNtpath(NtpathTestCase): 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 @@ class TestNtpath(NtpathTestCase): # 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())) |
