summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-01-26 19:42:45 +0100
committerMichał Górny <mgorny@gentoo.org>2021-01-26 19:43:09 +0100
commit024bc8140c68ef1759a29a68d0b275e4806b73cf (patch)
tree4377f42dfc626ddab7949dd8ecd9a9f80a3ef1da /dev-python/urllib3
parentdev-python/urllib3: Backport a fix for BytesWarning (diff)
downloadgentoo-024bc8140c68ef1759a29a68d0b275e4806b73cf.tar.gz
gentoo-024bc8140c68ef1759a29a68d0b275e4806b73cf.tar.bz2
gentoo-024bc8140c68ef1759a29a68d0b275e4806b73cf.zip
dev-python/urllib3: Fix tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/urllib3')
-rw-r--r--dev-python/urllib3/urllib3-1.26.2-r3.ebuild17
1 files changed, 12 insertions, 5 deletions
diff --git a/dev-python/urllib3/urllib3-1.26.2-r3.ebuild b/dev-python/urllib3/urllib3-1.26.2-r3.ebuild
index 28e11d23fe9..344bf53259f 100644
--- a/dev-python/urllib3/urllib3-1.26.2-r3.ebuild
+++ b/dev-python/urllib3/urllib3-1.26.2-r3.ebuild
@@ -50,6 +50,9 @@ python_prepare_all() {
# https://github.com/urllib3/urllib3/issues/1756
sed -e 's:10.255.255.1:240.0.0.0:' \
-i test/__init__.py || die
+ # upstream requires updates to this periodically. seriously?!
+ sed -e '/RECENT_DATE/s:date(.*):date(2020, 7, 1):' \
+ -i src/urllib3/connection.py || die
# tests failing if 'localhost.' cannot be resolved
sed -e 's:test_dotted_fqdn:_&:' \
-i test/with_dummyserver/test_https.py || die
@@ -62,9 +65,13 @@ python_prepare_all() {
python_test() {
local -x CI=1
# FIXME: get tornado ported
- case ${EPYTHON} in
- python3*)
- pytest -vv || die "Tests fail with ${EPYTHON}"
- ;;
- esac
+ [[ ${EPYTHON} == python3* ]] || continue
+
+ local deselect=(
+ # TODO?
+ test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
+ )
+
+ pytest -vv ${deselect[@]/#/--deselect } ||
+ die "Tests fail with ${EPYTHON}"
}