Include documentation
This commit is contained in:
parent
fa3cca51e1
commit
62f96eea6b
1
AUTHORS
1
AUTHORS
|
@ -222,6 +222,7 @@ Steffen Allner
|
||||||
Stephan Obermann
|
Stephan Obermann
|
||||||
Sven-Hendrik Haase
|
Sven-Hendrik Haase
|
||||||
Tadek Teleżyński
|
Tadek Teleżyński
|
||||||
|
Takafumi Arakaki
|
||||||
Tarcisio Fischer
|
Tarcisio Fischer
|
||||||
Tareq Alayan
|
Tareq Alayan
|
||||||
Ted Xiao
|
Ted Xiao
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Doctest can be now skipped dynamically with `pytest.skip`.
|
|
@ -80,7 +80,8 @@ def skip(msg="", **kwargs):
|
||||||
Skip an executing test with the given message.
|
Skip an executing test with the given message.
|
||||||
|
|
||||||
This function should be called only during testing (setup, call or teardown) or
|
This function should be called only during testing (setup, call or teardown) or
|
||||||
during collection by using the ``allow_module_level`` flag.
|
during collection by using the ``allow_module_level`` flag. This function can
|
||||||
|
be called in doctest as well.
|
||||||
|
|
||||||
:kwarg bool allow_module_level: allows this function to be called at
|
:kwarg bool allow_module_level: allows this function to be called at
|
||||||
module level, skipping the rest of the module. Default to False.
|
module level, skipping the rest of the module. Default to False.
|
||||||
|
@ -89,6 +90,9 @@ def skip(msg="", **kwargs):
|
||||||
It is better to use the :ref:`pytest.mark.skipif ref` marker when possible to declare a test to be
|
It is better to use the :ref:`pytest.mark.skipif ref` marker when possible to declare a test to be
|
||||||
skipped under certain conditions like mismatching platforms or
|
skipped under certain conditions like mismatching platforms or
|
||||||
dependencies.
|
dependencies.
|
||||||
|
Similarly, use ``# doctest: +SKIP`` directive (see `doctest.SKIP
|
||||||
|
<https://docs.python.org/3/library/doctest.html#doctest.SKIP>`_)
|
||||||
|
to skip a doctest statically.
|
||||||
"""
|
"""
|
||||||
__tracebackhide__ = True
|
__tracebackhide__ = True
|
||||||
allow_module_level = kwargs.pop("allow_module_level", False)
|
allow_module_level = kwargs.pop("allow_module_level", False)
|
||||||
|
|
Loading…
Reference in New Issue