File: //usr/lib/python3.7/__pycache__/doctest.cpython-37.pyc
B
îÇ{a\— ã ! @ sl d Z dZdddddddd d
ddd
ddddddddddddddddddd d!d"g!Zd#d$lZd#d$lZd#d$lZd#d$lZd#d$lZd#d$lZd#d$l Z d#d$l
Z
d#d$lZd#d$lZd#d%l
mZ d#d&lmZ ed'd(ƒZi Zd)d„ ZedƒZedƒZedƒZedƒZedƒZedƒZeeB eB eB eB eB Zed
ƒZedƒZedƒZed
ƒZedƒZeeB eB eB eB Z d*Z!d+Z"d,d-„ Z#dqd/d0„Z$d1d2„ Z%drd4d5„Z&d6d7„ Z'G d8d9„ d9eƒZ(d:d;„ Z)d<d=„ Z*d>d?„ Z+G d@dA„ dAej,ƒZ-dBdC„ Z.G dDd„ dƒZ/G dEd„ dƒZ0G dFd„ dƒZ1G dGd„ dƒZ2G dHd„ dƒZ3G dId„ dƒZ4G dJd„ de5ƒZ6G dKd„ de5ƒZ7G dLd„ de3ƒZ8d$a9dsdOd„Z:dMd$d$d$d$dMd#d$dNe1ƒ d$fdPd„Z;dtdRd„Z<d#a=dSd„ Z>G dTdU„ dUej?ƒZ@G dVdW„ dWe@ƒZAG dXdY„ dYejBƒZCdudZd„ZDG d[d\„ d\e@ƒZEdMd$d$e1ƒ d$fd]d^„ZFd_d„ ZGd`d„ ZHdad „ ZIdvdbd!„ZJdwdcdd„ZKdxded"„ZLG dfdg„ dgƒZMeMdhdidjdkdldmœZNdndo„ ZOePdpkrhe
QeOƒ ¡ d$S )yaÅ Module doctest -- a framework for running examples in docstrings.
In simplest use, end each module M to be tested with:
def _test():
import doctest
doctest.testmod()
if __name__ == "__main__":
_test()
Then running the module as a script will cause the examples in the
docstrings to get executed and verified:
python M.py
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
(why not stderr? because stderr is a lame hack <0.2 wink>), and the final
line of output is "Test failed.".
Run it with the -v switch instead:
python M.py -v
and a detailed report of all examples tried is printed to stdout, along
with assorted summaries at the end.
You can force verbose mode by passing "verbose=True" to testmod, or prohibit
it by passing "verbose=False". In either of those cases, sys.argv is not
examined by testmod.
There are a variety of other ways to run doctests, including integration
with the unittest framework, and support for running non-Python text
files containing doctests. There are also many ways to override parts
of doctest's default behaviors. See the Library Reference Manual for
details.
zreStructuredText enÚregister_optionflagÚDONT_ACCEPT_TRUE_FOR_1ÚDONT_ACCEPT_BLANKLINEÚNORMALIZE_WHITESPACEÚELLIPSISÚSKIPÚIGNORE_EXCEPTION_DETAILÚCOMPARISON_FLAGSÚREPORT_UDIFFÚREPORT_CDIFFÚREPORT_NDIFFÚREPORT_ONLY_FIRST_FAILUREÚREPORTING_FLAGSÚ FAIL_FASTÚExampleÚDocTestÚ
DocTestParserÚ
DocTestFinderÚ
DocTestRunnerÚ
OutputCheckerÚDocTestFailureÚUnexpectedExceptionÚDebugRunnerÚtestmodÚtestfileÚrun_docstring_examplesÚDocTestSuiteÚDocFileSuiteÚset_unittest_reportflagsÚscript_from_examplesÚ
testsourceÚ debug_srcÚdebugé N)ÚStringIO)Ú
namedtupleÚTestResultszfailed attemptedc C s t | dtt ƒ>