File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ Steffen Allner
222
222
Stephan Obermann
223
223
Sven-Hendrik Haase
224
224
Tadek Teleżyński
225
+ Takafumi Arakaki
225
226
Tarcisio Fischer
226
227
Tareq Alayan
227
228
Ted Xiao
Original file line number Diff line number Diff line change
1
+ Doctest can be now skipped dynamically with `pytest.skip `.
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ def skip(msg="", **kwargs):
80
80
Skip an executing test with the given message.
81
81
82
82
This function should be called only during testing (setup, call or teardown) or
83
- during collection by using the ``allow_module_level`` flag.
83
+ during collection by using the ``allow_module_level`` flag. This function can
84
+ be called in doctest as well.
84
85
85
86
:kwarg bool allow_module_level: allows this function to be called at
86
87
module level, skipping the rest of the module. Default to False.
@@ -89,6 +90,9 @@ def skip(msg="", **kwargs):
89
90
It is better to use the :ref:`pytest.mark.skipif ref` marker when possible to declare a test to be
90
91
skipped under certain conditions like mismatching platforms or
91
92
dependencies.
93
+ Similarly, use ``# doctest: +SKIP`` directive (see `doctest.SKIP
94
+ <https://docs.python.org/3/library/doctest.html#doctest.SKIP>`_)
95
+ to skip a doctest statically.
92
96
"""
93
97
__tracebackhide__ = True
94
98
allow_module_level = kwargs .pop ("allow_module_level" , False )
You can’t perform that action at this time.
0 commit comments