diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-02-01 04:00:05 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-02-01 04:00:05 (GMT) |
commit | bcb26c53c095c7bcd0e5415088e25dbd27f12592 (patch) | |
tree | 35240e335dd91a385c13935ddc64b33d9c17a8ad /Lib/importlib/test/test_api.py | |
parent | ae9ad186d058c5700d0692e2f3b026e95639f5cf (diff) | |
download | cpython-bcb26c53c095c7bcd0e5415088e25dbd27f12592.zip cpython-bcb26c53c095c7bcd0e5415088e25dbd27f12592.tar.gz cpython-bcb26c53c095c7bcd0e5415088e25dbd27f12592.tar.bz2 |
Rename importlib.test.support to importlib.test.util.
Diffstat (limited to 'Lib/importlib/test/test_api.py')
-rw-r--r-- | Lib/importlib/test/test_api.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/importlib/test/test_api.py b/Lib/importlib/test/test_api.py index 75053a0..2958adb 100644 --- a/Lib/importlib/test/test_api.py +++ b/Lib/importlib/test/test_api.py @@ -1,6 +1,6 @@ import unittest import importlib -from . import support +from . import util class ImportModuleTests(unittest.TestCase): @@ -9,8 +9,8 @@ class ImportModuleTests(unittest.TestCase): def test_module_import(self): # Test importing a top-level module. - with support.mock_modules('top_level') as mock: - with support.import_state(meta_path=[mock]): + with util.mock_modules('top_level') as mock: + with util.import_state(meta_path=[mock]): module = importlib.import_module('top_level') self.assertEqual(module.__name__, 'top_level') @@ -19,8 +19,8 @@ class ImportModuleTests(unittest.TestCase): pkg_name = 'pkg' pkg_long_name = '{0}.__init__'.format(pkg_name) name = '{0}.mod'.format(pkg_name) - with support.mock_modules(pkg_long_name, name) as mock: - with support.import_state(meta_path=[mock]): + with util.mock_modules(pkg_long_name, name) as mock: + with util.import_state(meta_path=[mock]): module = importlib.import_module(name) self.assertEqual(module.__name__, name) @@ -31,8 +31,8 @@ class ImportModuleTests(unittest.TestCase): module_name = 'mod' absolute_name = '{0}.{1}'.format(pkg_name, module_name) relative_name = '.{0}'.format(module_name) - with support.mock_modules(pkg_long_name, absolute_name) as mock: - with support.import_state(meta_path=[mock]): + with util.mock_modules(pkg_long_name, absolute_name) as mock: + with util.import_state(meta_path=[mock]): module = importlib.import_module(relative_name, pkg_name) self.assertEqual(module.__name__, absolute_name) @@ -42,8 +42,8 @@ class ImportModuleTests(unittest.TestCase): pkg_name = 'pkg' pkg_long_name = '{0}.__init__'.format(pkg_name) name = '{0}.mod'.format(pkg_name) - with support.mock_modules(pkg_long_name, name) as mock: - with support.import_state(meta_path=[mock]): + with util.mock_modules(pkg_long_name, name) as mock: + with util.import_state(meta_path=[mock]): module = importlib.import_module(name, pkg_name) self.assertEqual(module.__name__, name) |