-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-rx
and -rX
should turn on output for xfail/xpass
#11233
Comments
I'd be happy to work on this, but first I was hoping for
Of course, I'd be "happier" if someone else worked on this. :) |
Note that this is a significant problem for me currently, and we don't have a workable solution. |
I'm looking in |
I'm not sure if I'm using labels right. I think this missing functionality is a bug, and I have a proposed way it should work. |
Hi @okken, Sorry for the silence on this, seems like this one fell through the cracks.
I think so.
That would go into
There are several tests in There's #11574 if you want to comment/help review. 👍 |
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
With pytest-dev/pytest#11233, enabling summaries for xfailed tests also enables their full error tracebacks, which complicates finding the actual test failures. There is no way of disabling just the tracebacks, so disable the summaries of xpassed/xfailed tests altogether.
With pytest-dev/pytest#11233, enabling summaries for xfailed tests also enables their full error tracebacks, which complicates finding the actual test failures. There is no way of disabling just the tracebacks, so disable the summaries of xpassed/xfailed tests altogether.
-rx
and-rX
(as well as-ra
and-rA
) should allow output for xfail and xpass, but they don't.This shows up in a discussion #9834 and another issue #10618.
-rx
and-rX
are the obvious choice.---- More detail about problem and expectations ----
Observations:
Based on a simple test script below that includes
test_pass
,test_fail
,test_xfail
,test_xpass
.Output and exception for
test_fail
but not fortest_xfail
.test_xfail
to look mostly just liketest_fail
.assert 1 == 2
is displayed in summary info forFAILED
but not forXFAIL
.assert 1 == 2
should show up for XFAIL also.-rP
(which is included in-rA
) is "pass with output", and it applies toPASSED
, but notXPASS
.Opinion on how to fix this:
XFAIL
should act likeFAILED
if it's turned on with-rx
or-ra
or-rA
XPASS
should act likePASSED
if it's turned on with-rX
or-ra
or-rA
-r
flags seems like the right way to do 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.
pip list
from the virtual environment you are usingpytest and operating system versions
minimal example if possible
Example: test_foo.py
Current output:
The text was updated successfully, but these errors were encountered: