diff --git a/doc/en/skipping.rst b/doc/en/skipping.rst index fc4f66e76..b3eff61ab 100644 --- a/doc/en/skipping.rst +++ b/doc/en/skipping.rst @@ -31,7 +31,15 @@ Marking a test function to be skipped .. 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:: import sys