Don't use skip-mark in test_apply_tag_hook

@pytest.mark.skip was only introduced in pytest 2.9. Use xfail for
testing instead which will work with older pytest versions as well.
This commit is contained in:
Florian Bruhin 2016-06-29 17:32:06 +02:00
parent e76b066e6d
commit 0e8debd30b
1 changed files with 3 additions and 8 deletions

View File

@ -120,7 +120,7 @@ def test_apply_tag_hook(testdir):
Scenario: Tags
Given I have a bar
@skip
@xfail
Scenario: Tags 2
Given I have a bar
""")
@ -133,14 +133,9 @@ def test_apply_tag_hook(testdir):
scenarios('test.feature')
""")
result = testdir.runpytest('-rs')
result = testdir.runpytest('-rsx')
result.stdout.fnmatch_lines(["SKIP *: Not implemented yet"])
result.stdout.fnmatch_lines(
[
"SKIP *: unconditional skip",
"*= 2 skipped * =*",
],
)
result.stdout.fnmatch_lines(["*= 1 skipped, 1 xpassed * =*"])
def test_tag_with_spaces(testdir):