Merge rev 45677 from the trunk.

Bug #1337990: clarified that ``doctest`` does not support examples
requiring both expected output and an exception.
This commit is contained in:
Tim Peters
2006-04-24 02:07:13 +00:00
parent 0e706e8c4d
commit ca7841cc22
2 changed files with 13 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}}
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:

View File

@@ -54,6 +54,12 @@ Build
- Fix test_long failure on Tru64 with gcc by using -mieee gcc option.
Documentation
-------------
- Bug #1337990: clarified that ``doctest`` does not support examples
requiring both expected output and an exception.
What's New in Python 2.4.3?
===========================