summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-03-17 13:23:35 +0100
committerMichał Górny <mgorny@gentoo.org>2020-03-17 17:55:42 +0100
commit520b5b75f0d92245dbd364ffac3094d6ec46b648 (patch)
treee1360a6d5bbff6082d852963b4f5af25cd961747 /dev-python/selenium/selenium-3.141.0.ebuild
parentapp-crypt/qca: amd64 stable wrt bug #712776 (diff)
downloadgentoo-520b5b75f0d92245dbd364ffac3094d6ec46b648.tar.gz
gentoo-520b5b75f0d92245dbd364ffac3094d6ec46b648.tar.bz2
gentoo-520b5b75f0d92245dbd364ffac3094d6ec46b648.zip
dev-python/selenium: Enable unit tests, py3.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/selenium/selenium-3.141.0.ebuild')
-rw-r--r--dev-python/selenium/selenium-3.141.0.ebuild28
1 files changed, 24 insertions, 4 deletions
diff --git a/dev-python/selenium/selenium-3.141.0.ebuild b/dev-python/selenium/selenium-3.141.0.ebuild
index d89dd5f0152b..e513619c2cd6 100644
--- a/dev-python/selenium/selenium-3.141.0.ebuild
+++ b/dev-python/selenium/selenium-3.141.0.ebuild
@@ -3,20 +3,40 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6,7,8} )
inherit distutils-r1
DESCRIPTION="Python language binding for Selenium Remote Control"
HOMEPAGE="http://www.seleniumhq.org"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+# pypi tarball misses tests, github tarball misses generated files
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ test? (
+ https://github.com/SeleniumHQ/selenium/archive/${P}.tar.gz
+ -> ${P}.gh.tar.gz
+ )"
KEYWORDS="amd64 arm ~ia64 ~ppc ppc64 ~sparc x86"
LICENSE="Apache-2.0"
SLOT="0"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-
DOCS=( CHANGES README.rst )
QA_PREBUILT="/usr/lib*/python*/site-packages/${PN}/webdriver/firefox/*/x_ignore_nofocus.so"
+
+distutils_enable_tests pytest
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ if use test; then
+ cd "${S}" || die
+ ebegin "Unpacking tests from ${P}.gh.tar.gz"
+ tar -x -z -f "${DISTDIR}/${P}.gh.tar.gz" --strip-components 2 \
+ "${PN}-${P}"/py/test
+ eend ${?} || die
+ fi
+}
+
+python_test() {
+ pytest -vv test/unit || die "Tests fail with ${EPYTHON}"
+}