1 |
commit: b963c0cfcf8f766c81c8fbde53048e1e2aa6da3c |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 2 17:55:34 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 2 18:59:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b963c0cf |
7 |
|
8 |
dev-python/vcrpy: Port to py3.10 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/vcrpy/vcrpy-4.1.1.ebuild | 35 +++++++++++++++++++---------------- |
13 |
1 file changed, 19 insertions(+), 16 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/vcrpy/vcrpy-4.1.1.ebuild b/dev-python/vcrpy/vcrpy-4.1.1.ebuild |
16 |
index d110bfca31a..e54023e451a 100644 |
17 |
--- a/dev-python/vcrpy/vcrpy-4.1.1.ebuild |
18 |
+++ b/dev-python/vcrpy/vcrpy-4.1.1.ebuild |
19 |
@@ -3,8 +3,7 @@ |
20 |
|
21 |
EAPI=7 |
22 |
|
23 |
-PYTHON_COMPAT=( python3_{7..9} ) |
24 |
- |
25 |
+PYTHON_COMPAT=( python3_{8..10} ) |
26 |
inherit distutils-r1 |
27 |
|
28 |
DESCRIPTION="Automatically mock your HTTP interactions to simplify and speed up testing" |
29 |
@@ -32,20 +31,24 @@ BDEPEND=" |
30 |
|
31 |
distutils_enable_tests pytest |
32 |
|
33 |
-src_prepare() { |
34 |
- # tests requiring Internet |
35 |
- rm tests/integration/test_aiohttp.py || die |
36 |
- rm tests/integration/test_boto.py || die |
37 |
- sed -e 's:test_flickr_should_respond_with_200:_&:' \ |
38 |
- -e 's:test_amazon_doctype:_&:' \ |
39 |
- -i tests/integration/test_wild.py || die |
40 |
- sed -e 's:testing_connect:_&:' \ |
41 |
- -i tests/unit/test_stubs.py || die |
42 |
- |
43 |
- distutils-r1_src_prepare |
44 |
-} |
45 |
- |
46 |
python_test() { |
47 |
+ local deselect=( |
48 |
+ # these tests require Internet |
49 |
+ tests/integration/test_aiohttp.py |
50 |
+ tests/integration/test_boto.py |
51 |
+ tests/integration/test_httpx.py |
52 |
+ tests/integration/test_wild.py::test_flickr_should_respond_with_200 |
53 |
+ tests/integration/test_wild.py::test_amazon_doctype |
54 |
+ tests/unit/test_stubs.py::TestVCRConnection::testing_connect |
55 |
+ |
56 |
+ # probably unhappy about ssl module being more strict now |
57 |
+ 'tests/integration/test_httplib2.py::test_effective_url[https]' |
58 |
+ 'tests/integration/test_requests.py::test_effective_url[https]' |
59 |
+ 'tests/integration/test_requests.py::test_redirects[https]' |
60 |
+ 'tests/integration/test_urllib2.py::test_effective_url[https]' |
61 |
+ 'tests/integration/test_urllib3.py::test_redirects[https]' |
62 |
+ ) |
63 |
+ |
64 |
local -x REQUESTS_CA_BUNDLE=$("${EPYTHON}" -m pytest_httpbin.certs) |
65 |
- pytest -vv || die "Tests fail with ${EPYTHON}" |
66 |
+ epytest ${deselect[@]/#/--deselect } |
67 |
} |