summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-03 04:08:26 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-03 04:08:26 (GMT)
commit17111f3b242be06c7ae913f106093891b82d7fee (patch)
treebdfdd1b714cc7f53935c5e2337d1e94615db882a /Lib/test/test_support.py
parentf49a91340a22d89bea4f0566500d5f954f35c744 (diff)
downloadcpython-17111f3b242be06c7ae913f106093891b82d7fee.zip
cpython-17111f3b242be06c7ae913f106093891b82d7fee.tar.gz
cpython-17111f3b242be06c7ae913f106093891b82d7fee.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py3
1 files changed, 2 insertions, 1 deletions
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 @@ def run_unittest(testclass):
# 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 @@ def run_doctest(module, verbosity=None):
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