Update docs with new skip marker
This commit is contained in:
parent
ad0b8e31b8
commit
61b8443723
|
@ -31,7 +31,15 @@ Marking a test function to be skipped
|
||||||
|
|
||||||
.. versionadded:: 2.0, 2.4
|
.. versionadded:: 2.0, 2.4
|
||||||
|
|
||||||
Here is an example of marking a test function to be skipped
|
The simplest way to skip a function is to mark it with the `skip` decorator,
|
||||||
|
which may be passed an optional `reason`:
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="no way of currently testing this")
|
||||||
|
def test_the_unknown():
|
||||||
|
...
|
||||||
|
|
||||||
|
If you wish to skip something conditionally then you can use `skipif` instead.
|
||||||
|
Here is an example of marking a test function to bwe skipped
|
||||||
when run on a Python3.3 interpreter::
|
when run on a Python3.3 interpreter::
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
Loading…
Reference in New Issue