Mini Shell
a
�DOgx� � @ s6 d Z dZg d�ZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
mZ ddlmZ edd�Zi Zd d
� Zed�Zed�Zed
�Zed�Zed�Zed�ZeeB eB eB eB eB Zed�Zed�Zed�Zed�Zed�ZeeB eB eB eB Z dZ!dZ"dd� Z#drdd�Z$dd� Z%dd � Z&dsd"d#�Z'd$d%� Z(G d&d'� d'e�Z)d(d)� Z*d*d+� Z+d,d-� Z,G d.d/� d/ej-�Z.d0d1� Z/G d2d3� d3�Z0G d4d5� d5�Z1G d6d7� d7�Z2G d8d9� d9�Z3G d:d;� d;�Z4G d<d=� d=�Z5G d>d?� d?e6�Z7G d@dA� dAe6�Z8G dBdC� dCe4�Z9da:dtdFdG�Z;dDdddddDdddEe2� dfdHdI�Z<dudKdL�Z=da>dMdN� Z?G dOdP� dPej@�ZAG dQdR� dReA�ZBG dSdT� dTejC�ZDdvdUdV�ZEG dWdX� dXeA�ZFdDdde2� dfdYdZ�ZGd[d\� ZHd]d^� ZId_d`� ZJdwdadb�ZKdxdcdd�ZLdydedf�ZMG dgdh� dh�ZNeNdidjdkdldmdn�ZOdodp� ZPeQdqk�r2e
�ReP� � dS )za� 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 �>