diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index d21e54c6ecc9..40792714cc56 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1344,7 +1344,12 @@ eunittest() { _python_check_EPYTHON - set -- "${EPYTHON}" -m unittest_or_fail discover -v "${@}" + # unittest fails with "no tests" correctly since Python 3.12 + local runner=unittest + if _python_impl_matches "${EPYTHON}" 3.{9..11}; then + runner=unittest_or_fail + fi + set -- "${EPYTHON}" -m "${runner}" discover -v "${@}" echo "${@}" >&2 "${@}" || die -n "Tests failed with ${EPYTHON}" |