[issue17457] Unittest discover fails with namespace packages and builtin modules
Claudiu.Popa
report at bugs.python.org
Fri Nov 22 22:38:32 CET 2013
Claudiu.Popa added the comment:
Added patch which addresses Eric's comments. It contains a situation which I'm not so happy, mostly due to not knowing in depth (or at least at a comfortable level) the import mechanics: in the AttributeError except handler, if the spec can't be determined and the module is not built-in, a TypeError is raised to notice the user that discovery can't be done for that particular package. Probably this situation (no __file__, no __spec__ and no built-in) is common, but I can't think right now at another way of solving it.
----------
Added file: http://bugs.python.org/file32783/unittest_discover.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17457>
_______________________________________
More information about the Python-bugs-list
mailing list