472,127 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

doctest quiet again before exit how

Looks like every run of doctest after the first is verbose:

$ python2.5 quiet-once.py
(0, 0)
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
(0, 0)
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
(0, 0)
$
$ cat quiet-once.py
import doctest
print doctest.testmod()
print doctest.testmod()
print doctest.testmod()
$

How do I ask for another quiet run, before exiting the process?

Adding the arg verbose=False to the testmod call doesn't work.

Oct 16 '06 #1
1 1195
... every run of doctest after the first is verbose ...
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
Another path to the same bug:

import doctest
print doctest.testfile(__file__, verbose=False)
print doctest.testfile(__file__, verbose=False)

Mystifiedly yours, rank Python newbie, Pat LaVarre

Oct 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alan G Isaac | last post: by
2 posts views Thread by Michele Simionato | last post: by
5 posts views Thread by Michele Simionato | last post: by
1 post views Thread by David MacKay | last post: by
reply views Thread by Steven Bethard | last post: by
2 posts views Thread by p.lavarre | last post: by
1 post views Thread by Stuart D. Gathman | last post: by
12 posts views Thread by thomas.guest | last post: by
6 posts views Thread by Bzyczek | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.