dev-python/slimit: Call pytest directly
authorMichał Górny <mgorny@gentoo.org>
Wed, 25 Mar 2020 08:50:30 +0000 (09:50 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 25 Mar 2020 09:39:42 +0000 (10:39 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/slimit/slimit-0.8.1-r1.ebuild

index ca7d58331ceb94a0c5bdaef81636b8856b7ea27b..b5af60f39209db00197f4bbef58185e96c233e3d 100644 (file)
@@ -15,18 +15,13 @@ SRC_URI="https://github.com/rspivak/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
 RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-       test? (
-               dev-python/pytest[${PYTHON_USEDEP}]
-               dev-python/pytest-runner[${PYTHON_USEDEP}]
-       )"
 
 PATCHES=( "${FILESDIR}/${P}-fix-python3.patch" )
 
+distutils_enable_tests pytest
+
 python_compile() {
        distutils-r1_python_compile
 
@@ -39,5 +34,5 @@ python_compile() {
 }
 
 python_test() {
-       esetup.py pytest --addopts "${BUILD_DIR}" || die "Testing failed with ${EPYTHON}"
+       pytest -vv "${BUILD_DIR}" || die "Tests failed with ${EPYTHON}"
 }