Skip to content

Commit 767c28d

Browse files
committed
Fix broken test in test_junitxml
1 parent d1f2f77 commit 767c28d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

testing/test_junitxml.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,16 @@ def test_fail():
115115
def test_error(fixture):
116116
pass
117117
@pytest.mark.xfail
118+
def test_xfail():
119+
assert False
120+
@pytest.mark.xfail(strict=True)
118121
def test_xpass():
119-
assert 1
122+
assert True
120123
""")
121124
result, dom = runandparse(testdir)
122125
assert result.ret
123126
node = dom.find_first_by_tag("testsuite")
124-
node.assert_attr(name="pytest", errors=1, failures=1, skips=1, tests=4)
127+
node.assert_attr(name="pytest", errors=1, failures=2, skips=1, tests=5)
125128

126129
def test_timing_function(self, testdir):
127130
testdir.makepyfile("""

0 commit comments

Comments
 (0)