summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-12-03 15:33:56 +0100
committerMichał Górny <mgorny@gentoo.org>2020-12-03 15:34:33 +0100
commit71b1516c8f2f948de2ff8d134ea822d0ab35f494 (patch)
tree3b87b9b674bee06d83a5cfb5e68e92dddd50e03a /dev-python/backports-zoneinfo
parentdev-python/multidict: Bump to 5.1.0 (diff)
downloadgentoo-71b1516c8f2f948de2ff8d134ea822d0ab35f494.tar.gz
gentoo-71b1516c8f2f948de2ff8d134ea822d0ab35f494.tar.bz2
gentoo-71b1516c8f2f948de2ff8d134ea822d0ab35f494.zip
dev-python/backports-zoneinfo: Skip tests on pypy3.6
Closes: https://bugs.gentoo.org/758275 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/backports-zoneinfo')
-rw-r--r--dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild15
1 files changed, 15 insertions, 0 deletions
diff --git a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
index a801aa6a0fef..75591e167180 100644
--- a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
+++ b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
@@ -38,6 +38,21 @@ BDEPEND="
# pytest-subtests
distutils_enable_tests unittest
+python_test() {
+ if [[ ${EPYTHON} == pypy3 ]]; then
+ # pypy3.6 does not support dataclasses, and the backport
+ # does not work with pypy
+ local pypy3_version=$(best_version -b 'dev-python/pypy3')
+ if [[ ${pypy3_version} != *_p37* ]]; then
+ einfo "Skipping tests on pypy3.6 due to missing deps"
+ return
+ fi
+ fi
+
+ "${EPYTHON}" -m unittest discover -v ||
+ die "Tests failed with ${EPYTHON}"
+}
+
python_install() {
# avoid file collisions
rm "${BUILD_DIR}"/lib/backports/__init__.py || die