diff --git a/changelog/4911.feature.rst b/changelog/4911.feature.rst index 5106e6fb9..5aef92d76 100644 --- a/changelog/4911.feature.rst +++ b/changelog/4911.feature.rst @@ -1 +1 @@ -Doctest can be now skipped dynamically with `pytest.skip`. +Doctests can be skipped now dynamically using ``pytest.skip()``. diff --git a/src/_pytest/outcomes.py b/src/_pytest/outcomes.py index b08dbc7b3..06532dc62 100644 --- a/src/_pytest/outcomes.py +++ b/src/_pytest/outcomes.py @@ -81,7 +81,7 @@ def skip(msg="", **kwargs): This function should be called only during testing (setup, call or teardown) or during collection by using the ``allow_module_level`` flag. This function can - be called in doctest as well. + be called in doctests as well. :kwarg bool allow_module_level: allows this function to be called at module level, skipping the rest of the module. Default to False.