From 6ff0fdb977dbef3507f0a5de371f466f9dc873cb Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 3 Apr 2014 22:26:10 +0200 Subject: [PATCH] fix issue443: fix skip examples to use proper comparison. Thanks Alex Groenholm. --- CHANGELOG | 3 +++ doc/en/skipping.txt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 80861e8ac..e06dfd6c4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -55,6 +55,9 @@ NEXT (2.6) - work a bit harder to break reference cycles when catching exceptions. Thanks Jurko Gospodnetic. +- fix issue443: fix skip examples to use proper comparison. Thanks Alex + Groenholm. + 2.5.2 ----------------------------------- diff --git a/doc/en/skipping.txt b/doc/en/skipping.txt index 22e024c0c..c83e3541e 100644 --- a/doc/en/skipping.txt +++ b/doc/en/skipping.txt @@ -35,7 +35,7 @@ Here is an example of marking a test function to be skipped when run on a Python3.3 interpreter:: import sys - @pytest.mark.skipif(sys.version_info >= (3,3), + @pytest.mark.skipif(sys.version_info < (3,3), reason="requires python3.3") def test_function(): ... @@ -51,7 +51,7 @@ You can share skipif markers between modules. Consider this test module:: # content of test_mymodule.py import mymodule - minversion = pytest.mark.skipif(mymodule.__versioninfo__ >= (1,1), + minversion = pytest.mark.skipif(mymodule.__versioninfo__ < (1,1), reason="at least mymodule-1.1 required") @minversion def test_function():