Why no output sections for Xpass/Xfail? #9834
-
We have separate output sections for |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Hi @jeffwright13, Can you paste what we have today and what you would like to see, to make sure we are all on the same page? Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I'm running into this problem also. Example: test_foo.py import pytest
def test_pass():
print('in test_pass()')
a, b = 1, 1
assert a == b
def test_fail():
print('in test_fail()')
a, b = 1, 2
assert a == b
@pytest.mark.xfail
def test_xfail():
print('in test_xfail()')
a, b = 1, 2
assert a == b
@pytest.mark.xfail
def test_xpass():
print('in test_xpass()')
a, b = 1, 1
assert a == b Current output:
Observations:
Opinion on how to fix this:
My opinions, of course. But this would follow the idea of "behavior with the least surprise". And it doesn't require any extra flags. |
Beta Was this translation helpful? Give feedback.
-
(I had the same problem) its hacky but its a solution
and execute pytest with
EDIT:
|
Beta Was this translation helpful? Give feedback.
-
pytest 8.0.0 reports ouptut for xpass and xfail if you use |
Beta Was this translation helpful? Give feedback.
pytest 8.0.0 reports ouptut for xpass and xfail if you use
-rxX
or-ra
(which includes-rx
for xfail and-rX
for xpass )