T3566,T3546: added a blurb in usage.rst for usage of flag -r

This commit is contained in:
dhirensr 2018-08-31 11:20:15 +05:30
parent 338953a25d
commit 95881c870e
3 changed files with 39 additions and 0 deletions

View File

@ -47,6 +47,7 @@ Christian Theunert
Christian Tismer
Christopher Gilling
Cyrus Maden
Dhiren Serai
Daniel Grana
Daniel Hahler
Daniel Nuri

1
changelog/3566.doc.rst Normal file
View File

@ -0,0 +1 @@
Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info.

View File

@ -527,3 +527,40 @@ hook was invoked::
.. include:: links.inc
.. _`pytest.detailed_failed_tests_usage`:
Detailed Summary Report of Failed,Skipped,xfailed tests
--------------------------------------------------------
.. versionadded:: 2.9
When there are more than 200 tests in a file and pytest is run and many tests are failing,then it is difficult to find which tests
are failing and the person just doesn't wants to scroll and see each and every failed test.
This way the failed test can be missed,so pytest has a flag known as -r to denote the failed,skipped,xfailed tests.
To create an extra summary report at the end of the output, use this invocation::
python -r chars
where chars are :
- (f)ailed,
- (E)error,
- (s)skipped,
- (x)failed,
- (X)passed,
- (p)passed,
- (P)passed with output,
- (a)all except pP.
**Examples:**
- To show extra info on xfailed, xpassed, and skipped tests::
pytest -r xXs
- To show extra info on all tests except (p)assed and (P)assed with output ,this is the most commonly used command::
pytest -r a