distutils-r1.eclass: distutils_enable_tests, add 'setup.py' option
authorMichał Górny <mgorny@gentoo.org>
Fri, 15 Nov 2019 16:14:11 +0000 (17:14 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 20 Nov 2019 07:44:03 +0000 (08:44 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/distutils-r1.eclass

index e2cd076d414813a04026785d31b4fb1b9cbbeafb..63e77bf014c1a96530347144825cf651b0f80c42 100644 (file)
@@ -241,6 +241,7 @@ fi
 #
 # - nose: nosetests (dev-python/nose)
 # - pytest: dev-python/pytest
+# - setup.py: setup.py test (no deps included)
 # - unittest: for built-in Python unittest module
 #
 # This function is meant as a helper for common use cases, and it only
@@ -268,6 +269,11 @@ distutils_enable_tests() {
                                pytest -vv || die "Tests fail with ${EPYTHON}"
                        }
                        ;;
+               setup.py)
+                       python_test() {
+                               esetup.py test --verbose
+                       }
+                       ;;
                unittest)
                        python_test() {
                                "${EPYTHON}" -m unittest discover -v ||