summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-11-28 08:05:33 +0100
committerMichał Górny <mgorny@gentoo.org>2021-11-28 08:06:03 +0100
commite1677d9005fffa13c4998c7a868129c111b8d336 (patch)
treedc4068d3e48c92b02a33ac4575b8ff200b11fa5d
parentdev-python/hypothesis: Bump to 6.27.3 (diff)
downloadgentoo-e1677d9005fffa13c4998c7a868129c111b8d336.tar.gz
gentoo-e1677d9005fffa13c4998c7a868129c111b8d336.tar.bz2
gentoo-e1677d9005fffa13c4998c7a868129c111b8d336.zip
dev-python/requests: Update to upstream-approved patch
Upstream does not want to skip the test, so just move the import. We are skipping it anyway because of Internet access. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/requests/files/requests-2.26.0-trustme-dep.patch30
1 files changed, 14 insertions, 16 deletions
diff --git a/dev-python/requests/files/requests-2.26.0-trustme-dep.patch b/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
index b3a81659a9be..5542bb68da90 100644
--- a/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
+++ b/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
@@ -1,22 +1,20 @@
-From 6a1b5cbc124e0c3362ddefae5939db5c216a74db Mon Sep 17 00:00:00 2001
+From 55da533a87afe188282b7f8dfbadeb30c21743d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sat, 27 Nov 2021 10:33:35 +0100
-Subject: [PATCH] Skip the test requiring trustme when it is not available
+Subject: [PATCH] Defer the trustme import until inside the fixture
-Modify the nosan_server fixture to cause test_https_warnings to be
-skipped when trustme is not installed on the system, rather than causing
-the whole test suite to fail unconditionally. This makes it possible
-to run all the remaining tests on systems where trustme cannot be
-installed due to its dependencies.
+Move the trustme import from global scope into the nosan_server fixture
+in order to make it possible to deselect the test via command-line
+when trustme is not available.
---
- tests/conftest.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ tests/conftest.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/conftest.py b/tests/conftest.py
-index 099462cf..5d38f254 100644
+index 099462cf52..4f9b2641b4 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
-@@ -13,7 +13,6 @@ import threading
+@@ -13,7 +13,6 @@
import pytest
from requests.compat import urljoin
@@ -24,14 +22,14 @@ index 099462cf..5d38f254 100644
def prepare_url(value):
-@@ -38,6 +37,7 @@ def httpbin_secure(httpbin_secure):
+@@ -38,6 +37,10 @@ def httpbin_secure(httpbin_secure):
@pytest.fixture
def nosan_server(tmp_path_factory):
-+ trustme = pytest.importorskip('trustme')
++ # delay importing until the fixture in order to make it possible
++ # to deselect the test via command-line when trustme is not available
++ import trustme
++
tmpdir = tmp_path_factory.mktemp("certs")
ca = trustme.CA()
# only commonName, no subjectAltName
---
-2.34.1
-