diff options
author | Malcolm Smith <smith@chaquo.com> | 2024-03-28 19:59:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 19:59:12 (GMT) |
commit | 29829b58a8328a7c2ccacaa74c1d7d120a5e5ca5 (patch) | |
tree | 34c0e66676cc3720afc4470c80456039bcf4d66f /Doc | |
parent | efcc96844e7c66fcd6c23ac2d557ca141614ce9a (diff) | |
download | cpython-29829b58a8328a7c2ccacaa74c1d7d120a5e5ca5.zip cpython-29829b58a8328a7c2ccacaa74c1d7d120a5e5ca5.tar.gz cpython-29829b58a8328a7c2ccacaa74c1d7d120a5e5ca5.tar.bz2 |
gh-117294: Report DocTestCase as skipped if all examples in the doctest are skipped (GH-117297)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/doctest.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 1357581..a643a0e 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -1021,7 +1021,8 @@ from text files and modules with doctests: and runs the interactive examples in each file. If an example in any file fails, then the synthesized unit test fails, and a :exc:`failureException` exception is raised showing the name of the file containing the test and a - (sometimes approximate) line number. + (sometimes approximate) line number. If all the examples in a file are + skipped, then the synthesized unit test is also marked as skipped. Pass one or more paths (as strings) to text files to be examined. @@ -1087,7 +1088,8 @@ from text files and modules with doctests: and runs each doctest in the module. If any of the doctests fail, then the synthesized unit test fails, and a :exc:`failureException` exception is raised showing the name of the file containing the test and a (sometimes approximate) - line number. + line number. If all the examples in a docstring are skipped, then the + synthesized unit test is also marked as skipped. Optional argument *module* provides the module to be tested. It can be a module object or a (possibly dotted) module name. If not specified, the module calling |