summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-07-02 19:55:34 +0200
committerMichał Górny <mgorny@gentoo.org>2021-07-02 20:59:15 +0200
commitb963c0cfcf8f766c81c8fbde53048e1e2aa6da3c (patch)
treeda164c0eea39236aff32818d0ac8e11bd7bce268
parentdev-python/networkx: Enable py3.10 (diff)
downloadgentoo-b963c0cfcf8f766c81c8fbde53048e1e2aa6da3c.tar.gz
gentoo-b963c0cfcf8f766c81c8fbde53048e1e2aa6da3c.tar.bz2
gentoo-b963c0cfcf8f766c81c8fbde53048e1e2aa6da3c.zip
dev-python/vcrpy: Port to py3.10
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/vcrpy/vcrpy-4.1.1.ebuild35
1 files changed, 19 insertions, 16 deletions
diff --git a/dev-python/vcrpy/vcrpy-4.1.1.ebuild b/dev-python/vcrpy/vcrpy-4.1.1.ebuild
index d110bfca31a6..e54023e451ac 100644
--- a/dev-python/vcrpy/vcrpy-4.1.1.ebuild
+++ b/dev-python/vcrpy/vcrpy-4.1.1.ebuild
@@ -3,8 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Automatically mock your HTTP interactions to simplify and speed up testing"
@@ -32,20 +31,24 @@ BDEPEND="
distutils_enable_tests pytest
-src_prepare() {
- # tests requiring Internet
- rm tests/integration/test_aiohttp.py || die
- rm tests/integration/test_boto.py || die
- sed -e 's:test_flickr_should_respond_with_200:_&:' \
- -e 's:test_amazon_doctype:_&:' \
- -i tests/integration/test_wild.py || die
- sed -e 's:testing_connect:_&:' \
- -i tests/unit/test_stubs.py || die
-
- distutils-r1_src_prepare
-}
-
python_test() {
+ local deselect=(
+ # these tests require Internet
+ tests/integration/test_aiohttp.py
+ tests/integration/test_boto.py
+ tests/integration/test_httpx.py
+ tests/integration/test_wild.py::test_flickr_should_respond_with_200
+ tests/integration/test_wild.py::test_amazon_doctype
+ tests/unit/test_stubs.py::TestVCRConnection::testing_connect
+
+ # probably unhappy about ssl module being more strict now
+ 'tests/integration/test_httplib2.py::test_effective_url[https]'
+ 'tests/integration/test_requests.py::test_effective_url[https]'
+ 'tests/integration/test_requests.py::test_redirects[https]'
+ 'tests/integration/test_urllib2.py::test_effective_url[https]'
+ 'tests/integration/test_urllib3.py::test_redirects[https]'
+ )
+
local -x REQUESTS_CA_BUNDLE=$("${EPYTHON}" -m pytest_httpbin.certs)
- pytest -vv || die "Tests fail with ${EPYTHON}"
+ epytest ${deselect[@]/#/--deselect }
}