Issue #16803: Run test.test_importlib.test_abc under both

_frozen_importlib and source.
This commit is contained in:
Brett Cannon 2013-10-04 14:47:14 -04:00
parent 1448ecf470
commit 3ad327ec3a
2 changed files with 309 additions and 121 deletions

View file

@ -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).