diff options
author | Edward Loper <edloper@gradient.cis.upenn.edu> | 2004-08-26 02:45:51 (GMT) |
---|---|---|
committer | Edward Loper <edloper@gradient.cis.upenn.edu> | 2004-08-26 02:45:51 (GMT) |
commit | a89f88d53fc83b3eb6788a6e70e0eb05a58703ed (patch) | |
tree | 1302eecf3acad5eacc1153fab8c8c9c0fc52ba22 /Doc/lib/libdoctest.tex | |
parent | cc8a4f6563395e39d77da9888d0ea3675214ca64 (diff) | |
download | cpython-a89f88d53fc83b3eb6788a6e70e0eb05a58703ed.zip cpython-a89f88d53fc83b3eb6788a6e70e0eb05a58703ed.tar.gz cpython-a89f88d53fc83b3eb6788a6e70e0eb05a58703ed.tar.bz2 |
Added REPORT_ONLY_FIRST_FAILURE flag, which supresses output after the
first failing example in each test.
Diffstat (limited to 'Doc/lib/libdoctest.tex')
-rw-r--r-- | Doc/lib/libdoctest.tex | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex index dca79f7..99fbeb4 100644 --- a/Doc/lib/libdoctest.tex +++ b/Doc/lib/libdoctest.tex @@ -364,6 +364,17 @@ can also be used in doctest directives (see below). positions. \end{datadesc} +\begin{datadesc}{REPORT_ONLY_FIRST_FAILURE} + When specified, display the first failing example in each doctest, + but suppress output for all remaining examples. This will prevent + doctest from reporting correct examples that break because of + earlier failures; but it might also hide incorrect examples that + fail independently of the first failure. When + \constant{REPORT_ONLY_FIRST_FAILURE} is specified, the remaining + examples are still run, and still count towards the total number of + failures reported; only the output is suppressed. +\end{datadesc} + A "doctest directive" is a trailing Python comment on a line of a doctest example: @@ -421,8 +432,8 @@ can be useful. \versionchanged[Constants \constant{DONT_ACCEPT_BLANKLINE}, \constant{NORMALIZE_WHITESPACE}, \constant{ELLIPSIS}, - \constant{REPORT_UDIFF}, \constant{REPORT_CDIFF}, and - \constant{REPORT_NDIFF} + \constant{REPORT_UDIFF}, \constant{REPORT_CDIFF}, + \constant{REPORT_NDIFF}, and \constant{REPORT_ONLY_FIRST_FAILURE} were added; by default \code{<BLANKLINE>} in expected output matches an empty line in actual output; and doctest directives were added]{2.4} |