mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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:
@@ -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:
|
||||
|
||||
|
||||
@@ -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?
|
||||
===========================
|
||||
|
||||
Reference in New Issue
Block a user