Bug #1337990: clarified that doctest does not support examples

requiring both expected output and an exception.

I'll backport to 2.4 next.
This commit is contained in:
Tim Peters 2006-04-24 02:03:16 +00:00
parent d4c2177b78
commit 8dc73d2dc6
2 changed files with 9 additions and 4 deletions

View file

@ -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}} \subsubsection{What About Exceptions?\label{doctest-exceptions}}
No problem, provided that the traceback is the only output produced by No problem, provided that the traceback is the only output produced by
the example: just paste in the traceback. Since tracebacks contain the example: just paste in the traceback.\footnote{Examples containing
details that are likely to change rapidly (for example, exact file paths both expected output and an exception are not supported. Trying
and line numbers), this is one case where doctest works hard to be to guess where one ends and the other begins is too error-prone,
flexible in what it accepts. 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: Simple example:

View file

@ -171,6 +171,8 @@ Tools
Documentation Documentation
------------- -------------
- Bug #1337990: clarified that ``doctest`` does not support examples
requiring both expected output and an exception.
What's New in Python 2.5 alpha 1? What's New in Python 2.5 alpha 1?