commit:     ec488fa80b827534cc3ac6adfc4e420f04c84415
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 20 05:57:19 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 20 06:24:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec488fa8

dev-python/pytest-cov: Fix test cleanup on failure

Bug: https://bugs.gentoo.org/895316
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild 
b/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
index 3fca17c83eff..749138765092 100644
--- a/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
+++ b/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
@@ -61,7 +61,10 @@ python_test() {
        ln -s "${src}/coverage" \
                "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die
 
-       epytest
+       nonfatal epytest foo
+       local ret=${?}
 
        rm "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die
+
+       [[ ${ret} -ne 0 ]] && die "epytest failed on ${EPYTHON}"
 }

Reply via email to