diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-04-25 03:31:36 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-04-25 03:31:36 (GMT) |
commit | 711bf30b898c73a94f56b7edfb7dd10d5999cb27 (patch) | |
tree | 8414796c446936b19ae6949dc5a7cae548847a5e /Doc | |
parent | e96b229d2ad3944592b1889bb277388fec086049 (diff) | |
download | cpython-711bf30b898c73a94f56b7edfb7dd10d5999cb27.zip cpython-711bf30b898c73a94f56b7edfb7dd10d5999cb27.tar.gz cpython-711bf30b898c73a94f56b7edfb7dd10d5999cb27.tar.bz2 |
Patch #1475231: add a new SKIP doctest option, thanks to
Edward Loper.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libdoctest.tex | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex index 7c4cb41..4c4f228 100644 --- a/Doc/lib/libdoctest.tex +++ b/Doc/lib/libdoctest.tex @@ -616,6 +616,20 @@ TypeError: object doesn't support item assignment \end{datadesc} +\begin{datadesc}{SKIP} + + When specified, do not run the example at all. This can be useful + in contexts where doctest examples serve as both documentation and + test cases, and an example should be included for documentation + purposes, but should not be checked. E.g., the example's output + might be random; or the example might depend on resources which + would be unavailable to the test driver. + + The SKIP flag can also be used for temporarily "commenting out" + examples. + +\end{datadesc} + \begin{datadesc}{COMPARISON_FLAGS} A bitmask or'ing together all the comparison flags above. \end{datadesc} @@ -744,6 +758,7 @@ can be useful. were added; by default \code{<BLANKLINE>} in expected output matches an empty line in actual output; and doctest directives were added]{2.4} +\versionchanged[Constant \constant{SKIP} was added]{2.5} There's also a way to register new option flag names, although this isn't useful unless you intend to extend \refmodule{doctest} internals |