Message281015
It might be nice if the doctest example set the appropriate exit status. Apologies if this is beyond the scope of the example, but I thought it might be good practice.
Here is the file:
https://github.com/python/cpython/blob/master/Doc/library/doctest.rst
Here is the example as written:
if __name__ == "__main__":
import doctest
doctest.testmod()
Here is my proposal:
if __name__ == '__main__':
import doctest
import sys
results = doctest.testmod()
sys.exit(bool(results.failed))
I'm happy to fork the repo and submit a PR, if that makes things easier. I'm not familiar with the protocol here. Thanks for the great work! |
|
Date |
User |
Action |
Args |
2016-11-17 01:19:41 | Brainix | set | recipients:
+ Brainix, docs@python |
2016-11-17 01:19:40 | Brainix | set | messageid: <1479345580.78.0.277825169146.issue28722@psf.upfronthosting.co.za> |
2016-11-17 01:19:40 | Brainix | link | issue28722 messages |
2016-11-17 01:19:37 | Brainix | create | |
|