summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-02-03 21:16:07 (GMT)
committerBrett Cannon <brett@python.org>2013-02-03 21:16:07 (GMT)
commit7a34f02f9e651e8d021ceb759af102d9043b5a5b (patch)
treee11c20d5751abddaade5d39ca761fed47dc94217 /Lib/test/test_importlib
parent27aea0ca076f6a55f407144634d64c80ca89fb8b (diff)
downloadcpython-7a34f02f9e651e8d021ceb759af102d9043b5a5b.zip
cpython-7a34f02f9e651e8d021ceb759af102d9043b5a5b.tar.gz
cpython-7a34f02f9e651e8d021ceb759af102d9043b5a5b.tar.bz2
Way too many places create modules temporarily that never set
__loader__ for this test to succeed without a major changes. It also doesn't test the original issue of modules imported by Py_Initialize() having __loader__ set (the rest of the test covers that).
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/test_api.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py
index 162354b..b1a5894 100644
--- a/Lib/test/test_importlib/test_api.py
+++ b/Lib/test/test_importlib/test_api.py
@@ -182,12 +182,6 @@ class StartupTests(unittest.TestCase):
# Issue #17098: all modules should have __loader__ defined.
for name, module in sys.modules.items():
if isinstance(module, types.ModuleType):
- # pyexpat/xml.parsers.expat have submodules that it creates
- # by hand and do not set __loader__, which is acceptable.
- if 'expat' in name:
- continue
- 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__)