SF bug [#467336] doctest failures w/ new-style classes.
Taught doctest about static methods, class methods, and property docstrings
in new-style classes. As for inspect.py/pydoc.py before it, the new stuff
needed didn't really fit into the old architecture (but was less of a
strain to force-fit here).
New-style class docstrings still aren't found, but that's the subject
of a different bug and I want to fix that right instead of hacking around
it in doctest.
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 04a778b..e1923a6 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -176,7 +176,7 @@
# doctest driver.
def run_doctest(module, verbosity=None):
- """Run doctest on the given module.
+ """Run doctest on the given module. Return (#failures, #tests).
If optional argument verbosity is not specified (or is None), pass
test_support's belief about verbosity on to doctest. Else doctest's
@@ -198,5 +198,6 @@
f, t = doctest.testmod(module, verbose=verbosity)
if f:
raise TestFailed("%d of %d doctests failed" % (f, t))
+ return f, t
finally:
sys.stdout = save_stdout