Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/4] dev-python/cssselect: Example use of distutils_enable_tests
Date: Mon, 04 Nov 2019 21:01:07
Message-Id: 20191104210013.49303-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_tests to ease testing by "Michał Górny"
Signed-off-by: Michał Górny <mgorny@g.o>
---
 dev-python/cssselect/cssselect-1.0.3.ebuild | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dev-python/cssselect/cssselect-1.0.3.ebuild b/dev-python/cssselect/cssselect-1.0.3.ebuild
index 2d91e85a4ac2..d4216abcd6e7 100644
--- a/dev-python/cssselect/cssselect-1.0.3.ebuild
+++ b/dev-python/cssselect/cssselect-1.0.3.ebuild
@@ -23,7 +23,7 @@ DEPEND="
 	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
 	test? ( dev-python/lxml[${PYTHON_USEDEP}] )"
 
-RDEPEND=""
+distutils_enable_tests unittest
 
 python_prepare_all() {
 	# prevent non essential d'load of files in doc build
@@ -37,10 +37,6 @@ python_compile_all() {
 	fi
 }
 
-python_test() {
-	"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
-}
-
 python_install_all() {
 	use doc && local HTML_DOCS=( docs/_build/html/. )
 	distutils-r1_python_install_all
-- 
2.23.0