-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
use the original stream.
- avoid resetting capture FDs/sys.stdout for each test by keeping capturing
always turned on and looking at snapshotted capturing data during runtest
and collection phases.
- node.warn() for a node-specific warning
- config.warn() for a global non-node specific warning
Each warning is accompanied by a "warning number" so that we can later
introduce mechanisms for surpressing them.
Each warning will trigger a call to pytest_report_warn(number, node, message)
which is by default implemented by the TerminalReporter which introduces
a new option "-rw" to show details about warnings.
The only remaining 'py.test' references are:
* those referring to the 'py.test' executable
* those in code explicitly testing py.test/pytest module compatibility
* those in old CHANGES documentation
* those in documentation generated based on external data
* those in seemingly unfinished & unmaintained Japanese documentation
Minor stylistic changes and typo corrections made to documentation next to
several applied py.test --> pytest content changes.