Update docs with new skip marker

This commit is contained in:
Michael Aquilina 2015-09-21 15:29:07 +01:00
parent ad0b8e31b8
commit 61b8443723
1 changed files with 9 additions and 1 deletions

View File

@ -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