aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Fox <flewkey@2a03.party>2022-05-26 10:24:40 -0700
committerRyan Fox <flewkey@2a03.party>2022-05-26 10:24:40 -0700
commita5e3b8259c87d2176dbaf2c65a6403a3fc2beabc (patch)
tree2e03941d3ba247d873d1c8507ec2c3bbb0e1a928 /dev-python/pyclip
parentdev-util/deblob: Add := on hare (diff)
downloadguru-a5e3b8259c87d2176dbaf2c65a6403a3fc2beabc.tar.gz
guru-a5e3b8259c87d2176dbaf2c65a6403a3fc2beabc.tar.bz2
guru-a5e3b8259c87d2176dbaf2c65a6403a3fc2beabc.zip
dev-python/pyclip: Fix tests
Closes: https://bugs.gentoo.org/847169 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ryan Fox <flewkey@2a03.party>
Diffstat (limited to 'dev-python/pyclip')
-rw-r--r--dev-python/pyclip/pyclip-0.5.4.ebuild20
-rw-r--r--dev-python/pyclip/pyclip-0.6.0.ebuild12
-rw-r--r--dev-python/pyclip/pyclip-9999.ebuild12
3 files changed, 35 insertions, 9 deletions
diff --git a/dev-python/pyclip/pyclip-0.5.4.ebuild b/dev-python/pyclip/pyclip-0.5.4.ebuild
index ee9f89570..4bcb1c89a 100644
--- a/dev-python/pyclip/pyclip-0.5.4.ebuild
+++ b/dev-python/pyclip/pyclip-0.5.4.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..11} )
+PYTHON_COMPAT=( python3_{8..11} )
DISTUTILS_USE_SETUPTOOLS=bdepend
inherit distutils-r1
@@ -20,9 +20,19 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0"
SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
-DEPEND=""
-RDEPEND="x11-misc/xclip"
+DEPEND="
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )
+"
+RDEPEND="
+ x11-misc/xclip
+"
BDEPEND=""
-distutils_enable_tests pytest
+python_test() {
+ for unittest in "${S}/tests/"*".py"; do
+ "${EPYTHON}" "${unittest}" || die "Tests failed"
+ done
+}
diff --git a/dev-python/pyclip/pyclip-0.6.0.ebuild b/dev-python/pyclip/pyclip-0.6.0.ebuild
index 997c812c2..409487c50 100644
--- a/dev-python/pyclip/pyclip-0.6.0.ebuild
+++ b/dev-python/pyclip/pyclip-0.6.0.ebuild
@@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0"
SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
-DEPEND=""
+DEPEND="
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )
+"
RDEPEND="
gui-apps/wl-clipboard
x11-misc/xclip
"
BDEPEND=""
-distutils_enable_tests pytest
+python_test() {
+ for unittest in "${S}/tests/"*".py"; do
+ "${EPYTHON}" "${unittest}" || die "Tests failed"
+ done
+}
diff --git a/dev-python/pyclip/pyclip-9999.ebuild b/dev-python/pyclip/pyclip-9999.ebuild
index 997c812c2..409487c50 100644
--- a/dev-python/pyclip/pyclip-9999.ebuild
+++ b/dev-python/pyclip/pyclip-9999.ebuild
@@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0"
SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
-DEPEND=""
+DEPEND="
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )
+"
RDEPEND="
gui-apps/wl-clipboard
x11-misc/xclip
"
BDEPEND=""
-distutils_enable_tests pytest
+python_test() {
+ for unittest in "${S}/tests/"*".py"; do
+ "${EPYTHON}" "${unittest}" || die "Tests failed"
+ done
+}