Skip to content

Commit

Permalink
add xfailing test for pytest-dev#1540
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Apr 28, 2016
1 parent 6cc56b4 commit 308e76e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion testing/test_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,29 @@ def assert_markers(self, items, **expected):
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):
Expand Down Expand Up @@ -669,4 +692,3 @@ def assert_test_is_not_selected(keyword):

assert_test_is_not_selected("__")
assert_test_is_not_selected("()")

0 comments on commit 308e76e

Please sign in to comment.