diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-04-24 02:03:16 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-04-24 02:03:16 (GMT) |
commit | 8dc73d2dc6db62bed0fb75c71079dbdf06131cda (patch) | |
tree | 00df45eca40a87a5c1073f878b99c44077e95d79 /Doc/lib | |
parent | d4c2177b780d3d4e23ed1d541d52b3a896b8c5c8 (diff) | |
download | cpython-8dc73d2dc6db62bed0fb75c71079dbdf06131cda.zip cpython-8dc73d2dc6db62bed0fb75c71079dbdf06131cda.tar.gz cpython-8dc73d2dc6db62bed0fb75c71079dbdf06131cda.tar.bz2 |
Bug #1337990: clarified that `doctest` does not support examples
requiring both expected output and an exception.
I'll backport to 2.4 next.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libdoctest.tex | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex index 0e3a017..7c4cb41 100644 --- a/Doc/lib/libdoctest.tex +++ b/Doc/lib/libdoctest.tex @@ -407,10 +407,13 @@ You can force use of your own dict as the execution context by passing \subsubsection{What About Exceptions?\label{doctest-exceptions}} No problem, provided that the traceback is the only output produced by -the example: just paste in the traceback. Since tracebacks contain -details that are likely to change rapidly (for example, exact file paths -and line numbers), this is one case where doctest works hard to be -flexible in what it accepts. +the example: just paste in the traceback.\footnote{Examples containing + both expected output and an exception are not supported. Trying + to guess where one ends and the other begins is too error-prone, + and that also makes for a confusing test.} +Since tracebacks contain details that are likely to change rapidly (for +example, exact file paths and line numbers), this is one case where doctest +works hard to be flexible in what it accepts. Simple example: |