-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
Quoting https://docs.pytest.org/en/stable/doctest.html the last paragraph:
Skipping tests dynamically
New in version 4.4.
You can use pytest.skip to dynamically skip doctests. For example:
>>> import sys, pytest
>>> if sys.platform.startswith('win'):
... pytest.skip('this doctest does not work on Windows')
It is not clear where to put this skip-line into. The module? The specific docstring? Does it apply to every doctest definition in the file?
It could be mentioned that # doctest: +SKIP
skips a single line/doctest, which is what most people search for(?). A sentence if xfail
is possible would also be great.
Metadata
Metadata
Assignees
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification