Use a better xfail reason
This commit is contained in:
parent
bb3d6d87b6
commit
d1f2f779ee
|
@ -145,7 +145,7 @@ class TestXFail:
|
||||||
def test_xfail_xpassed(self, testdir):
|
def test_xfail_xpassed(self, testdir):
|
||||||
item = testdir.getitem("""
|
item = testdir.getitem("""
|
||||||
import pytest
|
import pytest
|
||||||
@pytest.mark.xfail(reason="nope")
|
@pytest.mark.xfail(reason="this is an xfail")
|
||||||
def test_func():
|
def test_func():
|
||||||
assert 1
|
assert 1
|
||||||
""")
|
""")
|
||||||
|
@ -153,7 +153,7 @@ class TestXFail:
|
||||||
assert len(reports) == 3
|
assert len(reports) == 3
|
||||||
callreport = reports[1]
|
callreport = reports[1]
|
||||||
assert callreport.passed
|
assert callreport.passed
|
||||||
assert callreport.wasxfail == "nope"
|
assert callreport.wasxfail == "this is an xfail"
|
||||||
|
|
||||||
def test_xfail_xpassed_strict(self, testdir):
|
def test_xfail_xpassed_strict(self, testdir):
|
||||||
item = testdir.getitem("""
|
item = testdir.getitem("""
|
||||||
|
|
Loading…
Reference in New Issue