diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-26 06:00:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 06:00:49 (GMT) |
commit | ddb961d2abe5d5fde76d85b21a77e4e91e0043ad (patch) | |
tree | 2cd70e8cdb5a4b8c4b65e079b66a3492b26fec30 /Doc/library/doctest.rst | |
parent | 3ec9af75f6825a32f369ee182a388c365db241b6 (diff) | |
download | cpython-ddb961d2abe5d5fde76d85b21a77e4e91e0043ad.zip cpython-ddb961d2abe5d5fde76d85b21a77e4e91e0043ad.tar.gz cpython-ddb961d2abe5d5fde76d85b21a77e4e91e0043ad.tar.bz2 |
bpo-35054: Add more index entries for symbols. (GH-10064)
Diffstat (limited to 'Doc/library/doctest.rst')
-rw-r--r-- | Doc/library/doctest.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index bc5a404..9988429 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -321,6 +321,10 @@ but doctest isn't trying to do an exact emulation of any specific Python shell. NO!!! >>> +.. index:: + single: >>>; interpreter prompt + single: ...; interpreter prompt + Any expected output must immediately follow the final ``'>>> '`` or ``'... '`` line containing the code, and the expected output (if any) extends to the next ``'>>> '`` or all-whitespace line. @@ -481,6 +485,8 @@ Some details you should read once, but won't need to remember: to test a :exc:`SyntaxError` that omits the traceback header, you will need to manually add the traceback header line to your test example. +.. index:: single: ^; caret + * For some :exc:`SyntaxError`\ s, Python displays the character position of the syntax error, using a ``^`` marker:: @@ -532,6 +538,7 @@ doctest decides whether actual output matches an example's expected output: option will probably go away, but not for several years. +.. index:: single: <BLANKLINE> .. data:: DONT_ACCEPT_BLANKLINE By default, if an expected output block contains a line containing only the @@ -551,6 +558,7 @@ doctest decides whether actual output matches an example's expected output: your source. +.. index:: single: ...; in doctests .. data:: ELLIPSIS When specified, an ellipsis marker (``...``) in the expected output can match @@ -686,6 +694,10 @@ useful unless you intend to extend :mod:`doctest` internals via subclassing: MY_FLAG = register_optionflag('MY_FLAG') +.. index:: + single: #; in doctests + single: +; in doctests + single: -; in doctests .. _doctest-directives: Directives |