Until now, teardown stdout/stderr output was not reported upon test failure.
However such output is sometime necessary to understand the failure.
fix#442
-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.
Fix added to show help of new reporting option 'a'.
Also, added testcase for checking reporting functionality
with option 'a'.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
The fix will add option 'a' to reporting which will ease task of
adding all options or reporting at once.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Passing tests override that default, making the color green; but several other
"boring" statuses (xfailed, xpassed, deselected, skipped) have no effect.
Net effect: if only "boring" tests are seen, or no tests at all, the summary
bar is yellow.
refactoring how nodeid's are constructed. They now are always
relative to the "common rootdir" of a test run which is determined by
finding a common ancestor of all testrun arguments.
--HG--
branch : issue616
This strips the line number, /@\d/, from the verbose output so it is
directly the node ID of the test. This in turn means no special logic
for accepting the line number as part of the node ID is needed when
parsing the command line.
The new "--tb=auto" option (default) will only display long tracebacks
for the first and last entry. You can get the old behaviour of printing
all entries as long entries with "--tb=long". Also short entries by
default are now printed very similarly to "--tb=native" ones.
Replace the verbose per-test reporting format of `file:line test_name RESULT`
with the node ID of the test, i.e. `file@line::class::method[param] RESULT`.
This patch does not update the examples in the docs; @hpk42 has a script
to regenerate those.
--HG--
branch : issue504