diff options
Diffstat (limited to 'Lib/test/test_importlib/util.py')
-rw-r--r-- | Lib/test/test_importlib/util.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py index 2745c9b7e3c..5c0375e04a6 100644 --- a/Lib/test/test_importlib/util.py +++ b/Lib/test/test_importlib/util.py @@ -13,6 +13,7 @@ import os.path from pathlib import Path, PurePath from test import support from test.support import import_helper +from test.support import os_helper import unittest import sys import tempfile @@ -159,9 +160,9 @@ def uncache(*names): @contextlib.contextmanager def temp_module(name, content='', *, pkg=False): conflicts = [n for n in sys.modules if n.partition('.')[0] == name] - with support.temp_cwd(None) as cwd: + with os_helper.temp_cwd(None) as cwd: with uncache(name, *conflicts): - with support.DirsOnSysPath(cwd): + with import_helper.DirsOnSysPath(cwd): invalidate_caches() location = os.path.join(cwd, name) @@ -397,7 +398,7 @@ def create_modules(*names): state_manager.__exit__(None, None, None) if uncache_manager is not None: uncache_manager.__exit__(None, None, None) - support.rmtree(temp_dir) + os_helper.rmtree(temp_dir) def mock_path_hook(*entries, importer): @@ -573,8 +574,8 @@ class ZipSetupBase: pass def setUp(self): - modules = support.modules_setup() - self.addCleanup(support.modules_cleanup, *modules) + modules = import_helper.modules_setup() + self.addCleanup(import_helper.modules_cleanup, *modules) class ZipSetup(ZipSetupBase): |