summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-06-04 16:34:54 +0200
committerMichał Górny <mgorny@gentoo.org>2021-06-04 16:40:52 +0200
commit19463e89b69204786b0d03b21df28113f4391cdb (patch)
tree1e6af9dc1d89186955652fc4a639ed2968a05481 /dev-python/wtforms/wtforms-2.3.3.ebuild
parentdev-python/python-email-validator: Enable py3.10 (diff)
downloadgentoo-19463e89b69204786b0d03b21df28113f4391cdb.tar.gz
gentoo-19463e89b69204786b0d03b21df28113f4391cdb.tar.bz2
gentoo-19463e89b69204786b0d03b21df28113f4391cdb.zip
dev-python/wtforms: Enable py3.10, fix tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/wtforms/wtforms-2.3.3.ebuild')
-rw-r--r--dev-python/wtforms/wtforms-2.3.3.ebuild33
1 files changed, 22 insertions, 11 deletions
diff --git a/dev-python/wtforms/wtforms-2.3.3.ebuild b/dev-python/wtforms/wtforms-2.3.3.ebuild
index 2f4d412cdd51..feb41b797919 100644
--- a/dev-python/wtforms/wtforms-2.3.3.ebuild
+++ b/dev-python/wtforms/wtforms-2.3.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( pypy3 python3_{7..9} )
+PYTHON_COMPAT=( pypy3 python3_{8..10} )
inherit distutils-r1
MY_PN="WTForms"
@@ -31,19 +31,30 @@ BDEPEND="
)
"
-distutils_enable_tests unittest
+distutils_enable_tests pytest
python_prepare_all() {
- # Extension-tests are written for an older version of Django
- # Disable pep8 even when it is installed
- sed \
- -e "s|'ext_django.tests', ||" \
- -e "/import pep8/d" \
- -e "s|has_pep8 = True|has_pep8 = False|" \
- -i tests/runtests.py || die
+ # use pytest instead of ugly custom test runner
+ cat >> setup.cfg <<-EOF || die
+ [tool:pytest]
+ python_files = *.py
+ EOF
+
distutils-r1_python_prepare_all
}
python_test() {
- "${EPYTHON}" tests/runtests.py -v || die
+ local ignore=(
+ # requires gaetest_common... also upstream doesn't run it at all
+ tests/ext_appengine
+ # requires old django; also extensions are deprecated anyway
+ tests/ext_django
+ )
+ local deselect=(
+ # incompatible with sqlalchemy-1.4
+ tests/ext_sqlalchemy.py::QuerySelectFieldTest
+ tests/ext_sqlalchemy.py::QuerySelectMultipleFieldTest
+ )
+
+ epytest tests ${ignore[@]/#/--ignore } ${deselect[@]/#/--deselect }
}