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
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')
-rw-r--r--dev-python/selenium/Manifest1
-rw-r--r--dev-python/selenium/selenium-3.141.0.ebuild28
2 files changed, 25 insertions, 4 deletions
diff --git a/dev-python/selenium/Manifest b/dev-python/selenium/Manifest
index 523d30915a78..5b97fee97f2a 100644
--- a/dev-python/selenium/Manifest
+++ b/dev-python/selenium/Manifest
@@ -1,3 +1,4 @@
DIST selenium-3.0.2.tar.gz 830314 BLAKE2B d6d2e5775fb1fe9d043a54ecc1757e5290326e048e16e1647d30ff4445e2a24d0b7acad7cba7d122f265d00704b665a4ae302d8804a97a7bd8d9066f6c926f8a SHA512 6ddbe68e65d8999dfa362fbafceee008967b73808d51efabbfa5a7e79325597ee6fa226a45347e1c5b7e479cc607af4f0233c31cc7296067566a4dcdf1f86496
DIST selenium-3.13.0.tar.gz 852146 BLAKE2B ef70397669f2c6c23942437ca1513882830bc952be5c20f37808d45d474b2ae85843662f186b9e68bab29184645b278fc6532d47635e4dfd3a851ddfd0c58111 SHA512 cc089032f9c1adac0cd629246d2ee3f986a0e448907408a40714381f42c0ea11be479b9714443f86460a65fdf86e107f9a840d3fde7a6401ef99f5ec491453b5
+DIST selenium-3.141.0.gh.tar.gz 155705874 BLAKE2B f75eec80e6caa86744092020abaeef56defcfac8278dd3fd605c29d6860c1c046956c7599164ba1b4682f20dfa997f5a942d83f7ad707b052ad3ca98c0800527 SHA512 add14d426c5b929901cd71104460c7ceaacf46374b46898254dc2e2602f4a9a370199da603e3f35375c0f297d6fc2fda00c9ce2ede9d5b893b072e0487883df2
DIST selenium-3.141.0.tar.gz 854669 BLAKE2B 621f4ab03bf85718b50099fdf10cdfadaf326bc7d9c9f1676a2a20e3ad23bede7884d8017b98bc6ebc314c6a4221c7668628d2d1888f36350c95eed1d82acee7 SHA512 3d2afbe9e96f88e9c055a89786b5090af387d3feba4598577b70fd3e0b20c2c09c4b25af920c654f52ec7e34f23181e6d278ac05f1a1f960d2d371ce7a6b82d8
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}"
+}