From 308e76e19c2fbfb34dbaed9a0237b7a96fd589c9 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 28 Apr 2016 16:11:30 +0200 Subject: [PATCH 1/3] add xfailing test for #1540 --- testing/test_mark.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/testing/test_mark.py b/testing/test_mark.py index aa1be6f7c..ca96255e7 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -563,6 +563,29 @@ class TestFunctional: if isinstance(v, MarkInfo)]) assert marker_names == set(expected_markers) + @pytest.mark.xfail + @pytest.mark.issue1540 + def test_mark_from_parameters(self, testdir): + testdir.makepyfile(""" + import pytest + + pytestmark = pytest.mark.skipif(True, reason='skip all') + + # skipifs inside fixture params + params = [pytest.mark.skipif(False, reason='dont skip')('parameter')] + + + @pytest.fixture(params=params) + def parameter(request): + return request.param + + + def test_1(parameter): + assert True + """) + + reprec = testdir.inline_run() + reprec.assertoutcome(skipped=1) class TestKeywordSelection: def test_select_simple(self, testdir): @@ -669,4 +692,3 @@ class TestKeywordSelection: assert_test_is_not_selected("__") assert_test_is_not_selected("()") - From 98dd2ce75cf35adc1e426e571109035d8a153ed6 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 28 Apr 2016 16:22:31 +0200 Subject: [PATCH 2/3] document reason for #1540 --- testing/test_mark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_mark.py b/testing/test_mark.py index ca96255e7..8d698b588 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -563,7 +563,7 @@ class TestFunctional: if isinstance(v, MarkInfo)]) assert marker_names == set(expected_markers) - @pytest.mark.xfail + @pytest.mark.xfail(reason='callspec2.setmulti missuses keywords') @pytest.mark.issue1540 def test_mark_from_parameters(self, testdir): testdir.makepyfile(""" From ec5e05834fd261d6880bc8b5b9912fff13a6e05f Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 18 May 2016 21:35:31 +0200 Subject: [PATCH 3/3] fix typo --- testing/test_mark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_mark.py b/testing/test_mark.py index 8d698b588..9b3e15b37 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -563,7 +563,7 @@ class TestFunctional: if isinstance(v, MarkInfo)]) assert marker_names == set(expected_markers) - @pytest.mark.xfail(reason='callspec2.setmulti missuses keywords') + @pytest.mark.xfail(reason='callspec2.setmulti misuses keywords') @pytest.mark.issue1540 def test_mark_from_parameters(self, testdir): testdir.makepyfile("""