summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/test_api.py')
-rw-r--r--Lib/test/test_importlib/test_api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py
index 3c3ba89..5d63d85 100644
--- a/Lib/test/test_importlib/test_api.py
+++ b/Lib/test/test_importlib/test_api.py
@@ -184,6 +184,12 @@ class StartupTests(unittest.TestCase):
if isinstance(module, types.ModuleType):
self.assertTrue(hasattr(module, '__loader__'),
'{!r} lacks a __loader__ attribute'.format(name))
+ if name in sys.builtin_module_names:
+ self.assertEqual(importlib.machinery.BuiltinImporter,
+ module.__loader__)
+ elif imp.is_frozen(name):
+ self.assertEqual(importlib.machinery.FrozenImporter,
+ module.__loader__)
def test_main():
from test.support import run_unittest