[issue5230] pydoc reports misleading failure if target module raises an ImportError

R. David Murray report at bugs.python.org
Mon Jun 1 13:45:20 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

Thanks.  The unit tests don't pass, though, at least not when I apply
the patch to trunk.  I get three failures.  So the patch isn't correct
as it stands.  'path' is the full module path (test.i_am_not_here in the
case of one of the test failures), but what appears in the error message
is just the name of the module that wasn't found.

Also consider the case where the import is 'import some.nested.module',
and the module that isn't found is 'nested'.  In fact it may be worth
writing an additional test for that case.

Also I'd recommend renaming badimport_module.py pydoc_badimport.py so as
to be parallel to the other pydoc auxiliary test files.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5230>
_______________________________________


More information about the Python-bugs-list mailing list