From c2b7912f97d080fafefaa213e9e88ba6c7cc4501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 14 Mar 2021 16:18:19 +0100 Subject: [PATCH] distutils-r1.eclass: Use eunittest, add dep on unittest-or-fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch to the new helper for running unittest-style tests. Add a new dependency on dev-python/unittest-or-fail. Besides making the test phase fail on missing tests, it also means that IUSE=test is now added cnsistently with nose and pytest variants. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 655a33e0d208c..b8b77103c0cb7 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -426,6 +426,7 @@ distutils_enable_tests() { setup.py) ;; unittest) + test_pkg="dev-python/unittest-or-fail" ;; *) die "${FUNCNAME}: unsupported argument: ${1}" @@ -830,7 +831,7 @@ distutils-r1_python_test() { nonfatal esetup.py test --verbose ;; unittest) - "${EPYTHON}" -m unittest discover -v + eunittest ;; *) die "Mis-synced test runner between ${FUNCNAME} and distutils_enable_testing"