summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2021-05-24 12:23:07 -0700
committerPatrick McLean <chutzpah@gentoo.org>2021-05-24 12:42:35 -0700
commite0b063dd3e7005cf0a4ea4ed7b2536270ea71f00 (patch)
tree51b5779f4350b6de9ff3f2d9bd30364975983be7 /dev-python
parentdev-python/flit_core-3.2.0: Add py310 (diff)
downloadgentoo-e0b063dd3e7005cf0a4ea4ed7b2536270ea71f00.tar.gz
gentoo-e0b063dd3e7005cf0a4ea4ed7b2536270ea71f00.tar.bz2
gentoo-e0b063dd3e7005cf0a4ea4ed7b2536270ea71f00.zip
dev-python/pytest-localserver-0.5.0: Add py310
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch39
-rw-r--r--dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch5
-rw-r--r--dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild9
3 files changed, 51 insertions, 2 deletions
diff --git a/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch
new file mode 100644
index 000000000000..c9a8fbf0f870
--- /dev/null
+++ b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch
@@ -0,0 +1,39 @@
+--- a/tests/test_https.py 2021-05-24 12:10:07.335676451 -0700
++++ b/tests/test_https.py 2021-05-24 12:10:23.966572498 -0700
+@@ -11,17 +11,20 @@
+ httpsserver = plugin.httpsserver
+
+
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
+ def test_httpsserver_funcarg(httpsserver):
+ assert isinstance(httpsserver, https.SecureContentServer)
+ assert httpsserver.is_alive()
+ assert httpsserver.server_address
+
+
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
+ def test_server_does_not_serve_file_at_startup(httpsserver):
+ assert httpsserver.code == 204
+ assert httpsserver.content == ''
+
+
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
+ def test_some_content_retrieval(httpsserver):
+ httpsserver.serve_content('TEST!')
+ resp = requests.get(httpsserver.url, verify=False)
+@@ -29,6 +32,7 @@
+ assert resp.status_code == 200
+
+
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
+ def test_GET_request(httpsserver):
+ httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
+ resp = requests.get(httpsserver.url, headers={'User-Agent': 'Test method'}, verify=False)
+@@ -37,6 +41,7 @@
+ assert 'text/plain' in resp.headers['Content-type']
+
+
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
+ def test_HEAD_request(httpsserver):
+ httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
+ print(httpsserver.url)
diff --git a/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch
new file mode 100644
index 000000000000..1cad7643973a
--- /dev/null
+++ b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch
@@ -0,0 +1,5 @@
+--- a/setup.cfg 2021-05-24 12:19:38.163108453 -0700
++++ b/setup.cfg 2021-05-24 12:19:58.714979990 -0700
+@@ -2 +2 @@
+-description-file = README
++description_file = README
diff --git a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild b/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild
index 21a6b9cdda9f..b995790ef5d4 100644
--- a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild
+++ b/dev-python/pytest-localserver/pytest-localserver-0.5.0.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=( python3_{7,8,9} pypy3 )
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
inherit distutils-r1
@@ -24,4 +24,9 @@ BDEPEND="
dev-python/six[${PYTHON_USEDEP}]
)"
+PATCHES=(
+ "${FILESDIR}/pytest-localserver-0.5.0-setup.patch"
+ "${FILESDIR}/pytest-localserver-0.5.0-py310-tests.patch"
+)
+
distutils_enable_tests pytest