Hide details of xpass, but keep the short list of them in "short test summary info" #13718
Replies: 4 comments
|
Use the targeted capture option together with pytest -q -rX --show-capture=no
|
|
Checking right now |
|
Unfortunately, |
|
There is no option for this yet. For xfail the same complaint was raised in #12231 and pytest 8.3 detached the tracebacks from Until then, a # conftest.py
def pytest_sessionstart(session):
reporter = session.config.pluginmanager.getplugin("terminalreporter")
if reporter is not None:
# Keep the XPASS lines from -rX in "short test summary info",
# drop the XPASSES section with captured output (pytest >= 8.0).
reporter.summary_xpasses = lambda: NoneChecked with It is a private method, so treat it as a workaround pinned to the versions you run, not as API. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I'm moving from
7.xto8.xand I've noticed that the-r Xoption now prints the logs of xpasses in stdout. #11574Is there a way to get the old behavior : list of xpasses shown in
short test summary info, but not more details ?My use case is that my test logs are very verbose, and adding them for xpasses by default in stdout is a no go, as it makes other details on failure harder to reach (my users are very sensitives on the signal/noise ratio in stdout).
Though, I'd like to keep the list of xpass tests, otherwise, they are invisibilised, and it reduces the incentive to activate them (this short list was the sweet spot in term of visibility/noise).
All reactions