mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-25 07:08:13 -07:00
dev-python/vcrpy: skip test requiring network access
Closes: https://bugs.gentoo.org/645514 Package-Manager: Portage-2.3.40_p15, Repoman-2.3.9_p247
This commit is contained in:
21
dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
Normal file
21
dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/tests/unit/test_stubs.py b/tests/unit/test_stubs.py
|
||||
index 7eb0684..a4bc7a1 100644
|
||||
--- a/tests/unit/test_stubs.py
|
||||
+++ b/tests/unit/test_stubs.py
|
||||
@@ -1,7 +1,7 @@
|
||||
from vcr.stubs import VCRHTTPSConnection
|
||||
from vcr.compat import mock
|
||||
from vcr.cassette import Cassette
|
||||
-
|
||||
+import pytest
|
||||
|
||||
class TestVCRConnection(object):
|
||||
|
||||
@@ -11,6 +11,7 @@ class TestVCRConnection(object):
|
||||
assert vcr_connection.real_connection.ssl_version == 'example_ssl_version'
|
||||
|
||||
@mock.patch('vcr.cassette.Cassette.can_play_response_for', return_value=False)
|
||||
+ @pytest.mark.skip('requires network access')
|
||||
def testing_connect(*args):
|
||||
vcr_connection = VCRHTTPSConnection('www.google.com')
|
||||
vcr_connection.cassette = Cassette('test', record_mode='all')
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
@@ -36,6 +36,10 @@ DEPEND="
|
||||
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/vcrpy-skip-network-tests.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
py.test -vv -x tests/unit || die
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ DEPEND="
|
||||
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/vcrpy-skip-network-tests.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
py.test -vv -x tests/unit || die
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user