diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-04-15 00:28:36 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-04-15 00:28:36 (GMT) |
commit | 1976d9bf6d5525821e1cb005a05acbf55a340dfa (patch) | |
tree | e0eb0c501c59ef769da9599aa921ea88dd49cad8 /Misc | |
parent | 865d23d1dd58c14d26cdff4ac143fce034cb3686 (diff) | |
download | cpython-1976d9bf6d5525821e1cb005a05acbf55a340dfa.zip cpython-1976d9bf6d5525821e1cb005a05acbf55a340dfa.tar.gz cpython-1976d9bf6d5525821e1cb005a05acbf55a340dfa.tar.bz2 |
#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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -630,6 +630,7 @@ Thomas Jollans Nicolas Joly Brian K. Jones Evan Jones +Glenn Jones Jeremy Jones Richard Jones Irmen de Jong @@ -203,6 +203,9 @@ Library - Issue #20334: inspect.Signature and inspect.Parameter are now hashable. +- Issue #15916: doctest.DocTestSuite returns an empty unittest.TestSuite instead + of raising ValueError if it finds no tests + IDLE ---- |