]> granicus.if.org Git - python/commit
#15916: if there are no docstrings, make empty suite, not an error.
authorR David Murray <rdmurray@bitdance.com>
Tue, 15 Apr 2014 00:28:36 +0000 (20:28 -0400)
committerR David Murray <rdmurray@bitdance.com>
Tue, 15 Apr 2014 00:28:36 +0000 (20:28 -0400)
commit1976d9bf6d5525821e1cb005a05acbf55a340dfa
treee0eb0c501c59ef769da9599aa921ea88dd49cad8
parent865d23d1dd58c14d26cdff4ac143fce034cb3686
#15916: if there are no docstrings, make empty suite, not an error.

This makes doctest work like unittest: if the test case is empty, that
just means there are zero tests run, it's not an error.  The existing
behavior was broken, since it only gave an error if there were *no*
docstrings, and zero tests run if there were docstrings but none of them
contained tests.  So this makes it self-consistent as well.

Patch by Glenn Jones.
Doc/library/doctest.rst
Doc/whatsnew/3.5.rst
Lib/doctest.py
Lib/test/test_doctest.py
Misc/ACKS
Misc/NEWS