diff options
Diffstat (limited to 'eclass/python-utils-r1.eclass')
| -rw-r--r-- | eclass/python-utils-r1.eclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index e213273a3a78..b08dbd586ba8 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1538,9 +1538,17 @@ epytest() { ) fi - args+=( - "--reruns=${EPYTEST_RERUNS}" - ) + if has_version ">=dev-python/pytest-rerunfailures-16.1"; then + args+=( + # --reruns only adds N reruns for tests not marked for reruns + # --force-reruns overrides the rerun count for all tests + "--force-reruns=${EPYTEST_RERUNS}" + ) + else + args+=( + "--reruns=${EPYTEST_RERUNS}" + ) + fi fi if [[ -n ${EPYTEST_TIMEOUT} ]]; then |
