[issue15178] Doctest should handle situations when test files are not readable
R. David Murray
report at bugs.python.org
Tue Jun 26 16:11:05 CEST 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
Ah, right, I misread the code when I looked at it.
There is usually a reason why something is done the way it is...though not always. But, running some example command lines, it looks to me like the current behavior is there because without it, you won't notice if the tests in the middle of your list of files failed. So, I think your second patch is more what we need. However, rather than calling sys.exit, I think it would be better to just print the message and do a return 1.
It is also possible we shouldn't change it at all. unittest (which has had some thought put in to the commnd line interface) just ends in a traceback in a similar situation (except that in unittest's case it is an ImportError...)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list