-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add -rp and -rP options to report passing tests. #1232
Add -rp and -rP options to report passing tests. #1232
Conversation
-rP is an alternative to `-s` for viewing the output of passing tests. This causes the captured stdout/stderr of passing tests to be output in the same way as that of failing tests. -rp adds a simple one-line-per-test summary for passing tests. Neither option is included by -ra. Additional changes to `pytest_capturelog` and `pytest_catchlog` are needed for this option to also output captured logs: They must be changed to use `rep.sections.add` instead of `rep.longrepr.addsection`, and to add these additional sections even if the test passes, since passing tests don't seem to have a `longrepr` at report time.
It looks like no changes are needed to |
Could you please add yourself to |
Sure thing. |
I just noticed there are no tests for this feature... we should have at least two tests, one for |
just wanted to chime in and say "yeah". Just needed "-rp" the other day. looking forward to the merge :) |
Added two tests for |
The |
Add -rp and -rP options to report passing tests.
Well done, thanks 👍 |
-rP
is an alternative to-s
for viewing the output of passing tests.This causes the captured stdout/stderr of passing tests to be output in
the same way as that of failing tests.
-rp
adds a simple one-line-per-test summary for passing tests.Neither option is included by
-ra
.Additional changes topytest_capturelog
andpytest_catchlog
areneeded for this option to also output captured logs: They must be
changed to use
rep.sections.add
instead ofrep.longrepr.addsection
,and to add these additional sections even if the test passes, since
passing tests don't seem to have a
longrepr
at report time.