diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-11-21 20:09:21 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-11-21 20:09:21 (GMT) |
commit | 5a9d7061236991f671beb0ac4d298e9b79ce6f10 (patch) | |
tree | 13b8a1d0c3876c6bdba6f354fc3ee1e47488769c /Doc | |
parent | 90d3352da7094fd8074207cc630cf220ad0ce64e (diff) | |
download | cpython-5a9d7061236991f671beb0ac4d298e9b79ce6f10.zip cpython-5a9d7061236991f671beb0ac4d298e9b79ce6f10.tar.gz cpython-5a9d7061236991f671beb0ac4d298e9b79ce6f10.tar.bz2 |
#16522: Add FAIL_FAST flag to doctest.
Patch by me, most of the work (doc and tests) by Daniel Urban.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/doctest.rst | 10 | ||||
-rw-r--r-- | Doc/whatsnew/3.4.rst | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 222c719..8822ef3 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -633,6 +633,16 @@ The second group of options controls how test failures are reported: the output is suppressed. +.. data:: FAIL_FAST + + When specified, exit after the first failing example and don't attempt to run + the remaining examples. Thus, the number of failures reported will always be 1. + This flag may be useful during debugging, since examples after the first + failure won't even produce debugging output. + + .. versionadded:: 3.4 + + .. data:: REPORTING_FLAGS A bitmask or'ing together all the reporting flags above. diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 4bed2ed..ab0b163 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -150,7 +150,11 @@ New Modules Improved Modules ================ -* None yet. +doctest +------- + +Added ``FAIL_FAST`` flag to halt test running as soon as the first failure is +detected. (Contributed by R. David Murray and Daniel Urban in :issue:`16522`.) Optimizations |