Index of the doctest24 module
-
m
formencode.util.doctest24
...
- Module doctest -- a framework for running examples in docstrings.
-
a
REPORT_UDIFF
...
-
a
COMPARISON_FLAGS
...
-
a
__docformat__
...
-
a
DONT_ACCEPT_TRUE_FOR_1
...
-
a
NORMALIZE_WHITESPACE
...
-
a
IGNORE_EXCEPTION_DETAIL
...
-
a
ELLIPSIS
...
-
a
REPORT_CDIFF
...
-
a
DONT_ACCEPT_BLANKLINE
...
-
a
REPORT_ONLY_FIRST_FAILURE
...
-
a
REPORTING_FLAGS
...
-
a
REPORT_NDIFF
...
-
C
OutputChecker
...
- A class used to check the whether the actual output from a doctest
example matches the expected output. OutputChecker defines two
methods: check_output, which compares a given pair of outputs,
and returns true if they match; and output_difference, which
returns a string describing the differences between two outputs.
-
f
check_output
...
- Return True iff the actual output from an example (got)
matches the expected output (want). These strings are
always considered to match if they are identical; but
depending on what option flags the test runner is using,
several non-exact match types are also possible. See the
documentation for TestRunner for more information about
option flags.
-
f
output_difference
...
- Return a string describing the differences between the
expected output for a given example (example) and the actual
output (got). optionflags is the set of option flags used
to compare want and got.
-
C
DocTestFailure
...
- A DocTest example has failed in debugging mode.
-
C
Tester
...
-
C
DocTestRunner
...
- A class used to run DocTest test cases, and accumulate statistics.
The run method is used to process a single DocTest case. It
returns a tuple (f, t), where t is the number of test cases
tried, and f is the number of test cases that failed.
-
a
DIVIDER
...
-
f
report_unexpected_exception
...
- Report that the given example raised an unexpected exception.
-
f
run
...
- Run the examples in test, and display the results using the
writer function out.
-
f
report_start
...
- Report that the test runner is about to process the given
example. (Only displays a message if verbose=True)
-
f
merge
...
-
f
report_failure
...
- Report that the given example failed.
-
f
report_success
...
- Report that the given example ran successfully. (Only
displays a message if verbose=True)
-
f
summarize
...
- Print a summary of all the test cases that have been run by
this DocTestRunner, and return a tuple (f, t), where f is
the total number of failed examples, and t is the total
number of tried examples.
-
f
__init__
...
- Create a new test runner.
-
C
DocTest
...
- A collection of doctest examples that should be run in a single
namespace. Each DocTest defines the following attributes:
-
f
__init__
...
- Create a new DocTest containing the given examples. The
DocTest's globals are initialized with a copy of globs.
-
f
__cmp__
...
-
C
UnexpectedException
...
- A DocTest example has encountered an unexpected exception
-
C
Example
...
- A single doctest example, consisting of source code and expected
output. Example defines the following attributes:
-
C
DocTestParser
...
- A class used to parse strings containing doctest examples.
-
f
get_examples
...
- Extract all doctest examples from the given string, and return
them as a list of Example objects. Line numbers are
0-based, because it's most common in doctests that nothing
interesting appears on the same line as opening triple-quote,
and so the first interesting line is called "line 1" then.
-
f
get_doctest
...
- Extract all doctest examples from the given string, and
collect them into a DocTest object.
-
f
parse
...
- Divide the given string into examples and intervening text,
and return them as a list of alternating Examples and strings.
Line numbers for the Examples are 0-based. The optional
argument name is a name identifying this string, and is only
used for error messages.
-
C
DocTestFinder
...
- A class used to extract the DocTests that are relevant to a given
object, from its docstring and the docstrings of its contained
objects. Doctests can currently be extracted from the following
object types: modules, functions, classes, methods, staticmethods,
classmethods, and properties.
-
f
find
...
- Return a list of the DocTests that are defined by the given
object's docstring, or by any of its contained objects'
docstrings.
-
f
__init__
...
- Create a new doctest finder.
-
C
DebugRunner
...
- Run doc tests but raise an exception as soon as there is a failure.
-
f
report_unexpected_exception
...
-
f
run
...
-
f
report_start
...
- Report that the test runner is about to process the given
example. (Only displays a message if verbose=True)
-
f
merge
...
-
f
report_failure
...
-
f
report_success
...
- Report that the given example ran successfully. (Only
displays a message if verbose=True)
-
f
summarize
...
- Print a summary of all the test cases that have been run by
this DocTestRunner, and return a tuple (f, t), where f is
the total number of failed examples, and t is the total
number of tried examples.
-
f
__init__
...
- Create a new test runner.
-
f
testmod
...
-
- m=None, name=None, globs=None, verbose=None, isprivate=None,
- report=True, optionflags=0, extraglobs=None, raise_on_error=False,
exclude_empty=False
-
f
testsource
...
- Extract the test sources from a doctest docstring as a script.
-
f
set_unittest_reportflags
...
- Sets the unittest option flags.
-
f
testfile
...
- Test examples in the given file. Return (#failures, #tests).
-
f
DocFileSuite
...
- A unittest suite for one or more doctest files.
-
f
run_docstring_examples
...
- Test examples in the given object's docstring (f), using globs
as globals. Optional argument name is used in failure messages.
If the optional argument verbose is true, then generate output
even if there are no failures.
-
f
DocTestSuite
...
- Convert doctest tests for a module to a unittest test suite.
-
f
register_optionflag
...
-
f
debug_src
...
- Debug a single doctest docstring, in argument src'
-
f
is_private
...
- prefix, base -> true iff name prefix + "." + base is "private".
-
f
script_from_examples
...
- Extract script from text with examples.
-
f
debug
...
- Debug a single doctest docstring.