diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 168c767a2eea0..b104b6694ac37 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1272,7 +1272,12 @@ epytest() { echo "${@}" >&2 "${@}" || die -n "pytest failed with ${EPYTHON}" - return ${?} + local ret=${?} + + # remove common temporary directories left over by pytest plugins + rm -rf .hypothesis .pytest_cache || die + + return ${ret} } # @FUNCTION: eunittest