diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-30 16:19:24 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-30 16:19:24 (GMT) |
commit | 38330fe5ef3c0227d2267774b9b95352d290e9d7 (patch) | |
tree | 05fac325926c66104c37f2a65c41f80b625e6e23 /Doc | |
parent | ed047486f5dd79cb594ef100362fe04ab1ef3e0a (diff) | |
download | cpython-38330fe5ef3c0227d2267774b9b95352d290e9d7.zip cpython-38330fe5ef3c0227d2267774b9b95352d290e9d7.tar.gz cpython-38330fe5ef3c0227d2267774b9b95352d290e9d7.tar.bz2 |
The distinction between comparison flags and reporting flags isn't unique
to unittest, so make it official: new module constants COMPARISON_FLAGS
and REPORTING_FLAGS, which are bitmasks or'ing together the relevant
individual option flags.
set_unittest_reportflags(): Reworked to use REPORTING_FLAGS, and
simplified overly complicated flag logic.
class FakeModule: Removed this; neither documented nor used.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libdoctest.tex | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex index eedb44d..bd9bb3d 100644 --- a/Doc/lib/libdoctest.tex +++ b/Doc/lib/libdoctest.tex @@ -365,6 +365,10 @@ example's expected output: is prone to in regular expressions. \end{datadesc} +\begin{datadesc}{COMPARISON_FLAGS} + A bitmask or'ing together all the comparison flags above. +\end{datadesc} + The second group of options controls how test failures are reported: \begin{datadesc}{REPORT_UDIFF} @@ -398,6 +402,10 @@ The second group of options controls how test failures are reported: failures reported; only the output is suppressed. \end{datadesc} +\begin{datadesc}{REPORTING_FLAGS} + A bitmask or'ing together all the reporting flags above. +\end{datadesc} + A "doctest directive" is a trailing Python comment on a line of a doctest example: @@ -456,7 +464,8 @@ can be useful. \versionchanged[Constants \constant{DONT_ACCEPT_BLANKLINE}, \constant{NORMALIZE_WHITESPACE}, \constant{ELLIPSIS}, \constant{REPORT_UDIFF}, \constant{REPORT_CDIFF}, - \constant{REPORT_NDIFF}, and \constant{REPORT_ONLY_FIRST_FAILURE} + \constant{REPORT_NDIFF}, \constant{REPORT_ONLY_FIRST_FAILURE}, + \constant{COMPARISON_FLAGS} and \constant{REPORTING_FLAGS} were added; by default \code{<BLANKLINE>} in expected output matches an empty line in actual output; and doctest directives were added]{2.4} |