eclass/python-utils-r1: Sync with Gentoo

It's from Gentoo commit ddda228a67a145f1baed788b5a605dc382ddc9a9.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2025-11-03 07:10:26 +00:00 committed by Krzesimir Nowak
parent fa8dab383d
commit 61966db095

View File

@ -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