Skip to content

Commit 1a63b6a

Browse files
authored
Document how to exclude exceptions coming from using assert (#224)
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 <remy.greinhofer@gmail.com>
1 parent bfc030f commit 1a63b6a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ would only rerun those errors that does not match with ``AssertionError`` or ``O
107107
108108
$ pytest --reruns 5 --rerun-except AssertionError --rerun-except OSError
109109
110+
.. note::
111+
112+
When the ```AssertionError``` comes from the use of the ``assert`` keyword,
113+
use ``--rerun-except assert`` instead::
114+
115+
$ pytest --reruns 5 --rerun-except assert
116+
110117
Re-run individual failures
111118
--------------------------
112119

0 commit comments

Comments
 (0)