summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-04-09 09:19:06 +0200
committerMichał Górny <mgorny@gentoo.org>2025-04-15 16:19:37 +0200
commit6651290a7f9e0d22738a71c1c471952b60dfffb2 (patch)
tree518ea6072998d08e69c4a1e98a88ddeaec39286c /eclass/python-utils-r1.eclass
parentd4ccb328184df4fcf18b4286dbbce3fe07287ac6 (diff)
downloadgentoo-6651290a7f9e0d22738a71c1c471952b60dfffb2.tar.gz
gentoo-6651290a7f9e0d22738a71c1c471952b60dfffb2.tar.bz2
gentoo-6651290a7f9e0d22738a71c1c471952b60dfffb2.zip
python-utils-r1.eclass: Remove unittest-or-fail use
Remove the use of dev-python/unittest-or-fail in favor of using stdlib unittest runner for all implementations. While technically the latter doesn't error out on "no tests" on Python 3.11 and older, this doesn't really matter, because we're going to detect broken invocations while testing on 3.12+. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 2 insertions, 6 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index affb8e55a50d..79097765167f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1481,7 +1481,7 @@ epytest() {
# @FUNCTION: eunittest
# @USAGE: [<args>...]
# @DESCRIPTION:
-# Run unit tests using dev-python/unittest-or-fail, passing the standard
+# Run unit tests using unittest, passing the standard
# set of options, followed by user-specified options.
#
# This command dies on failure and respects nonfatal.
@@ -1492,11 +1492,7 @@ eunittest() {
_python_check_occluded_packages
# 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 "${@}"
+ set -- "${EPYTHON}" -m unittest discover -v "${@}"
echo "${@}" >&2
"${@}" || die -n "Tests failed with ${EPYTHON}"