]> granicus.if.org Git - python/commitdiff
Fix test_pydoc when sys.modules["test"] is first imported using importlib.import_module.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 6 Mar 2010 14:04:16 +0000 (14:04 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 6 Mar 2010 14:04:16 +0000 (14:04 +0000)
Lib/test/test_pydoc.py

index bfa99e7d9e4844adf5882db319f00687d59d1425..a2b87c3389ec4430970092b3ecfd98f17d2e4be4 100644 (file)
@@ -14,6 +14,10 @@ from test.support import (
 
 from test import pydoc_mod
 
+# Just in case sys.modules["test"] has the optional attribute __loader__.
+if hasattr(pydoc_mod, "__loader__"):
+    del pydoc_mod.__loader__
+
 expected_text_pattern = \
 """
 NAME