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>
This commit is contained in:
Ryan Fox
2022-05-26 10:24:40 -07:00
parent 2eb58cd70e
commit a5e3b8259c
3 changed files with 35 additions and 9 deletions

View File

@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # 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 DISTUTILS_USE_SETUPTOOLS=bdepend
inherit distutils-r1 inherit distutils-r1
@@ -20,9 +20,19 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/" HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0" LICENSE="Apache-2.0"
SLOT="0" SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="" DEPEND="
RDEPEND="x11-misc/xclip" test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
RDEPEND="
x11-misc/xclip
"
BDEPEND="" BDEPEND=""
distutils_enable_tests pytest python_test() {
for unittest in "${S}/tests/"*".py"; do
"${EPYTHON}" "${unittest}" || die "Tests failed"
done
}

View File

@@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/" HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0" LICENSE="Apache-2.0"
SLOT="0" SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="" DEPEND="
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
RDEPEND=" RDEPEND="
gui-apps/wl-clipboard gui-apps/wl-clipboard
x11-misc/xclip x11-misc/xclip
" "
BDEPEND="" BDEPEND=""
distutils_enable_tests pytest python_test() {
for unittest in "${S}/tests/"*".py"; do
"${EPYTHON}" "${unittest}" || die "Tests failed"
done
}

View File

@@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
HOMEPAGE="https://pypi.org/project/pyclip/" HOMEPAGE="https://pypi.org/project/pyclip/"
LICENSE="Apache-2.0" LICENSE="Apache-2.0"
SLOT="0" SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="" DEPEND="
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
RDEPEND=" RDEPEND="
gui-apps/wl-clipboard gui-apps/wl-clipboard
x11-misc/xclip x11-misc/xclip
" "
BDEPEND="" BDEPEND=""
distutils_enable_tests pytest python_test() {
for unittest in "${S}/tests/"*".py"; do
"${EPYTHON}" "${unittest}" || die "Tests failed"
done
}