Issue #19703: Update pydoc to use the new importer APIs.

This commit is contained in:
Eric Snow 2014-01-06 20:42:59 -07:00
parent 3192eac6cf
commit 3a62d14b24
3 changed files with 17 additions and 4 deletions

View file

@ -649,8 +649,10 @@ class PydocImportTest(PydocBaseTest):
def test_importfile(self):
loaded_pydoc = pydoc.importfile(pydoc.__file__)
self.assertIsNot(loaded_pydoc, pydoc)
self.assertEqual(loaded_pydoc.__name__, 'pydoc')
self.assertEqual(loaded_pydoc.__file__, pydoc.__file__)
self.assertEqual(loaded_pydoc.__spec__, pydoc.__spec__)
class TestDescriptions(unittest.TestCase):