]> granicus.if.org Git - python/commitdiff
Bug #1337990: clarified that `doctest` does not support examples
authorTim Peters <tim.peters@gmail.com>
Mon, 24 Apr 2006 02:03:16 +0000 (02:03 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 24 Apr 2006 02:03:16 +0000 (02:03 +0000)
requiring both expected output and an exception.

I'll backport to 2.4 next.

Doc/lib/libdoctest.tex
Misc/NEWS

index 0e3a017c0d03ee2a21bd33affc93c05affd086ed..7c4cb417693a0ba6837f77f832048a5b3f9c4a3b 100644 (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:
 
index 6f3880ed2cd7cdc12b1deb6701989f8d18204b58..8788c584407ece2827c7dd5816e5f8214d712272 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -171,6 +171,8 @@ Tools
 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?