[issue7559] TestLoader.loadTestsFromName swallows import errors
Chris Jerdonek
report at bugs.python.org
Thu Apr 8 10:36:53 CEST 2010
Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:
FYI, there seems to be a bug in the code cited above:
http://twistedmatrix.com/trac/browser/trunk/twisted/python/reflect.py#L382
For example, _importAndCheckStack('package.subpackage.module') raises
_NoModuleFound in the following scenario:
package/subpackage/__init__.py:
import no_exist
when it should instead raise an ImportError from the buggy __init__.py.
I now think there should be at least a few unit tests to cover this case and a couple similar permutations.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7559>
_______________________________________
More information about the Python-bugs-list
mailing list