Documenting doctest_default_flags config variable (#2471).

This commit is contained in:
taschini
2016-04-21 10:54:53 +02:00
parent 88337c6533
commit 8c1d9cc71c

View File

@@ -55,13 +55,10 @@ names.
.. rst:directive:: .. doctest:: [group]
A doctest-style code block. You can use standard :mod:`doctest` flags for
controlling how actual output is compared with what you give as output. By
default, these options are enabled: ``ELLIPSIS`` (allowing you to put
ellipses in the expected output that match anything in the actual output),
``IGNORE_EXCEPTION_DETAIL`` (not comparing tracebacks),
``DONT_ACCEPT_TRUE_FOR_1`` (by default, doctest accepts "True" in the output
where "1" is given -- this is a relic of pre-Python 2.2 times).
A doctest-style code block. You can use standard :mod:`doctest`
flags for controlling how actual output is compared with what you
give as output. The default set of flags is specified by the
:confval:`doctest_default_flags` configuration variable.
This directive supports two options:
@@ -176,6 +173,16 @@ The following is an example for the usage of the directives. The test via
There are also these config values for customizing the doctest extension:
.. confval:: doctest_default_flags
By default, these options are enabled: ``ELLIPSIS`` (allowing you
to put ellipses in the expected output that match anything in the
actual output), ``IGNORE_EXCEPTION_DETAIL`` (everything following
the leftmost colon and any module information in the exception name
is ignored), ``DONT_ACCEPT_TRUE_FOR_1`` (by default, doctest
accepts "True" in the output where "1" is given -- this is a relic
of pre-Python 2.2 times).
.. confval:: doctest_path
A list of directories that will be added to :data:`sys.path` when the doctest