[Python-checkins] cpython (3.3): Way too many places create modules temporarily that never set
brett.cannon
python-checkins at python.org
Sun Feb 3 22:16:52 CET 2013
http://hg.python.org/cpython/rev/94c3f4176725
changeset: 81980:94c3f4176725
branch: 3.3
parent: 81978:cf588b72c989
user: Brett Cannon <brett at python.org>
date: Sun Feb 03 16:16:07 2013 -0500
summary:
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).
files:
Lib/test/test_importlib/test_api.py | 6 ------
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
--- a/Lib/test/test_importlib/test_api.py
+++ b/Lib/test/test_importlib/test_api.py
@@ -182,12 +182,6 @@
# 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__)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list