mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Provide a clue that the doctests have run.
This commit is contained in:
parent
929f06c570
commit
35b34bd326
1 changed files with 3 additions and 1 deletions
|
@ -285,6 +285,8 @@ 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
|
||||
if verbose:
|
||||
print 'Ran %d doctests with zero failures' % (t,)
|
||||
return f, t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue