pytest-dev / pytest-rerunfailures

a pytest plugin that re-runs failed tests up to -n times to eliminate flakey failures
Other
369 stars 82 forks source link

Fix handling of --rerun-except arguments #226

Closed cfulljames closed 1 year ago

cfulljames commented 1 year ago

Previously, a failure had to match all --rerun-except arguments to prevent a test from rerunning. Now it will not rerun if one or more are matched.

Additionally, if --only-rerun and --rerun-except are used together, a failure must match at least one --only-rerun pattern and none of the --rerun-except patterns for the test to be rerun. Previously a test would be rerun if it matched neither --only-rerun nor --rerun-except.

Fixes #225