Skip to content

Commit

Permalink
Document how to exclude exceptions coming from using assert (#224)
Browse files Browse the repository at this point in the history
Updates the README.md file to mention the special use case when
attempting to ignore `AssertionErrors` coming from the use of the
`assert` keyword.

Signed-off-by: Rémy Greinhofer <[email protected]>
  • Loading branch information
rgreinho authored Jul 3, 2023
1 parent bfc030f commit 1a63b6a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ would only rerun those errors that does not match with ``AssertionError`` or ``O
$ pytest --reruns 5 --rerun-except AssertionError --rerun-except OSError
.. note::

When the ```AssertionError``` comes from the use of the ``assert`` keyword,
use ``--rerun-except assert`` instead::

$ pytest --reruns 5 --rerun-except assert

Re-run individual failures
--------------------------

Expand Down

0 comments on commit 1a63b6a

Please sign in to comment.