From 085a656c81c601bd5102d0d2334363bb2e0c6af3 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Sat, 6 Mar 2010 14:04:16 +0000 Subject: Fix test_pydoc when sys.modules["test"] is first imported using importlib.import_module. --- Lib/test/test_pydoc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index bfa99e7..a2b87c3 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -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 -- cgit v0.12