summaryrefslogtreecommitdiff
path: root/Lib/importlib/test/test_api.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-02-01 04:00:05 +0000
committerBrett Cannon <bcannon@gmail.com>2009-02-01 04:00:05 +0000
commit9fa26f57161acf472346c384dd97724d24f81906 (patch)
treee736ca31b13ff5b9b28caf3f3428885694a3d021 /Lib/importlib/test/test_api.py
parent055c8b40b13741d7b0c8445e699e621b2173637d (diff)
downloadcpython-9fa26f57161acf472346c384dd97724d24f81906.tar.gz
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.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/importlib/test/test_api.py b/Lib/importlib/test/test_api.py
index 75053a074c..2958adbe46 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)