From 1bed514eb61c61b99d90fb2e631b8c940aecbb3d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 5 Dec 2015 00:35:31 -0200 Subject: [PATCH 1/2] Fix inconsistency in skipif example Fix #1224 --- doc/en/skipping.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/skipping.rst b/doc/en/skipping.rst index 5b08b1dfb..ec08e36c8 100644 --- a/doc/en/skipping.rst +++ b/doc/en/skipping.rst @@ -83,8 +83,8 @@ As with all function :ref:`marking ` you can skip test functions at the `whole class- or module level`_. If your code targets python2.6 or above you use the skipif decorator (and any other marker) on classes:: - @pytest.mark.skipif(sys.platform != 'win32', - reason="requires windows") + @pytest.mark.skipif(sys.platform == 'win32', + reason="does not run on windows") class TestPosixCalls: def test_function(self): From 382efc636336a78c970462dfa40829f4a76b14b6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 5 Dec 2015 00:43:06 -0200 Subject: [PATCH 2/2] Fix same inconsistency in next example --- doc/en/skipping.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/skipping.rst b/doc/en/skipping.rst index ec08e36c8..28b7d154f 100644 --- a/doc/en/skipping.rst +++ b/doc/en/skipping.rst @@ -97,8 +97,8 @@ If your code targets python2.5 where class-decorators are not available, you can set the ``pytestmark`` attribute of a class:: class TestPosixCalls: - pytestmark = pytest.mark.skipif(sys.platform != 'win32', - reason="requires Windows") + pytestmark = pytest.mark.skipif(sys.platform == 'win32', + reason="does not run on windows") def test_function(self): "will not be setup or run under 'win32' platform"