R. David Murray <rdmur...@bitdance.com> added the comment: No need to apologize, and thank you for taking the time to learn this stuff. (Six months ago I didn't know how the python unit test suite worked either...and I keep learning new things.)
For me your new test fails...and it isn't quite the one I had in mind. The test fails because with your patch pydoc correctly reports that there is no documentation for the non-existent temrinal module, while your test is expecting it to report a missing module. (This makes me wonder...is the existing behavior of pydoc optimal? With this patch in place would it be better to report that there is no such module rather than that there is no documentation found? But let's ignore that issue for the moment since this patch is required even if we were to change that message.) The test I had in mind would be a file pydoc_badimport2.py containing: import test.i_dont_exist.neither_do_i In that case, your patch will fail, because the error message will report that "i_dont_exist" can't be found. It's funny how these seemingly simple things turn out to be not quite so simple. Perhaps we could extract the last token (the module name) from the error message, and only do the "no doc" message if it is equal to the last element of the path name. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5230> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com