%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/__pycache__/ |
Current File : //usr/local/lib/python3.8/__pycache__/doctest.cpython-38.pyc |
U na_ ! @ st 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 ZedZedZedZedZedZedZeeB eB eB eB eB Zed ZedZedZed ZedZeeB eB eB eB Z d*Z!d+Z"d,d- Z#dsd/d0Z$d1d2 Z%d3d4 Z&dtd6d7Z'd8d9 Z(G d:d; d;eZ)d<d= Z*d>d? Z+d@dA Z,G dBdC dCej-Z.dDdE Z/G dFd dZ0G dGd dZ1G dHd dZ2G dId dZ3G dJd dZ4G dKd dZ5G dLd de6Z7G dMd de6Z8G dNd de4Z9d$a:dudQdZ;dOd$d$d$d$dOd#d$dPe2 d$fdRdZ<dvdTdZ=d#a>dUd Z?G dVdW dWej@ZAG dXdY dYeAZBG dZd[ d[ejCZDdwd\dZEG d]d^ d^eAZFdOd$d$e2 d$fd_d`ZGdad ZHdbd ZIdcd ZJdxddd!ZKdydedfZLdzdgd"ZMG dhdi diZNeNdjdkdldmdndoZOdpdq ZPeQdrkrpe ReP d$S ){a 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 enregister_optionflagDONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEELLIPSISSKIPIGNORE_EXCEPTION_DETAILCOMPARISON_FLAGSREPORT_UDIFFREPORT_CDIFFREPORT_NDIFFREPORT_ONLY_FIRST_FAILUREREPORTING_FLAGS FAIL_FASTExampleDocTest DocTestParser DocTestFinder DocTestRunner OutputCheckerDocTestFailureUnexpectedExceptionDebugRunnertestmodtestfilerun_docstring_examplesDocTestSuiteDocFileSuiteset_unittest_reportflagsscript_from_examples testsource debug_srcdebug N)StringIO) namedtupleTestResultszfailed attemptedc C s t | dtt >