Skip to content

Commit d1f2f77

Browse files
committed
Use a better xfail reason
1 parent bb3d6d8 commit d1f2f77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/test_skipping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ def test_func():
145145
def test_xfail_xpassed(self, testdir):
146146
item = testdir.getitem("""
147147
import pytest
148-
@pytest.mark.xfail(reason="nope")
148+
@pytest.mark.xfail(reason="this is an xfail")
149149
def test_func():
150150
assert 1
151151
""")
152152
reports = runtestprotocol(item, log=False)
153153
assert len(reports) == 3
154154
callreport = reports[1]
155155
assert callreport.passed
156-
assert callreport.wasxfail == "nope"
156+
assert callreport.wasxfail == "this is an xfail"
157157

158158
def test_xfail_xpassed_strict(self, testdir):
159159
item = testdir.getitem("""

0 commit comments

Comments
 (0)