summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/util.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-10-04 18:47:14 (GMT)
committerBrett Cannon <brett@python.org>2013-10-04 18:47:14 (GMT)
commit3ad327ec3ad1887a9e5ab738ba12b5f78751a791 (patch)
tree1e5457ef04d275d5898f61bab5c265261ef3af8f /Lib/test/test_importlib/util.py
parent1448ecf470013cee63c0682f615c5256928dc6b0 (diff)
downloadcpython-3ad327ec3ad1887a9e5ab738ba12b5f78751a791.zip
cpython-3ad327ec3ad1887a9e5ab738ba12b5f78751a791.tar.gz
cpython-3ad327ec3ad1887a9e5ab738ba12b5f78751a791.tar.bz2
Issue #16803: Run test.test_importlib.test_abc under both
_frozen_importlib and source.
Diffstat (limited to 'Lib/test/test_importlib/util.py')
-rw-r--r--Lib/test/test_importlib/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py
index f97ca72..91a6361 100644
--- a/Lib/test/test_importlib/util.py
+++ b/Lib/test/test_importlib/util.py
@@ -6,6 +6,15 @@ import sys
import types
+def import_importlib(module_name):
+ """Import a module from importlib both w/ and w/o _frozen_importlib."""
+ fresh = ('importlib',) if '.' in module_name else ()
+ frozen = support.import_fresh_module(module_name)
+ source = support.import_fresh_module(module_name, fresh=fresh,
+ blocked=('_frozen_importlib',))
+ return frozen, source
+
+
CASE_INSENSITIVE_FS = True
# Windows is the only OS that is *always* case-insensitive
# (OS X *can* be case-sensitive).