[issue19746] No introspective way to detect ModuleImportFailure in unittest
R. David Murray
report at bugs.python.org
Wed Sep 10 14:42:16 CEST 2014
R. David Murray added the comment:
Yeah, I figured out it was loader only errors after I read the code :)
"load_tests not called" is very different from "load_tests produced an exception", so the text of the error message should be changed accordingly.
I understood your use case more-or-less, my question was, why is the error *string* the thing returned? Given that the synthetic test encapsulates and re-raises the error, might it be more useful to store the exception object in the errors attribute rather than the message strings? That would seem to provide more introspectability.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19746>
_______________________________________
More information about the Python-bugs-list
mailing list