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>
This commit is contained in:
Patrick McLean
2021-05-24 12:23:07 -07:00
parent 8566f76fd7
commit e0b063dd3e
3 changed files with 51 additions and 2 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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