|
5.2.1 Normal UsageIn normal use, end each module M with:
Then running the module as a script causes the examples in the docstrings to get executed and verified:
This won't display anything unless an example fails, in which case the
failing example(s) and the cause(s) of the failure(s) are printed to stdout,
and the final line of output is Run it with the -v switch instead:
and a detailed report of all examples tried is printed to
You can force verbose mode by passing
In any case, testmod returns a 2-tuple of ints See About this document... for information on suggesting changes. |