diff options
Diffstat (limited to 'doc/ext/doctest.rst')
-rw-r--r-- | doc/ext/doctest.rst | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/doc/ext/doctest.rst b/doc/ext/doctest.rst index 2d06b69e6..818b86007 100644 --- a/doc/ext/doctest.rst +++ b/doc/ext/doctest.rst @@ -59,12 +59,9 @@ a comma-separated list of group 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). + 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: @@ -182,6 +179,20 @@ Configuration The doctest extension uses the following configuration values: +.. 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``, causing everything following the leftmost + colon and any module information in the exception name to be ignored; + - ``DONT_ACCEPT_TRUE_FOR_1``, rejecting "True" in the output where "1" is + given -- the default behavior of accepting this substitution is a relic of + pre-Python 2.2 times. + + .. versionadded:: 1.5 + .. confval:: doctest_path A list of directories that will be added to :data:`sys.path` when the doctest |