merge w/ 3.3
This commit is contained in:
commit
c0b631c0c4
|
@ -183,12 +183,6 @@ class StartupTests(unittest.TestCase):
|
||||||
# Issue #17098: all modules should have __loader__ defined.
|
# Issue #17098: all modules should have __loader__ defined.
|
||||||
for name, module in sys.modules.items():
|
for name, module in sys.modules.items():
|
||||||
if isinstance(module, types.ModuleType):
|
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:
|
if name in sys.builtin_module_names:
|
||||||
self.assertIn(module.__loader__,
|
self.assertIn(module.__loader__,
|
||||||
(importlib.machinery.BuiltinImporter,
|
(importlib.machinery.BuiltinImporter,
|
||||||
|
|
Loading…
Reference in New Issue