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 <[email protected]>
1 parent bfc030f commit 1a63b6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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)