summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-06-20 17:46:20 -0400
committerMike Gilbert <floppym@gentoo.org>2018-06-20 17:46:35 -0400
commit7559106d73eb9f57fdee1e50bfca158be6eba6a5 (patch)
tree58da5bd83dc803c30b8e95c26148700987ac4f19 /dev-python/vcrpy
parentwww-client/chromium: update patch (diff)
downloadgentoo-7559106d73eb9f57fdee1e50bfca158be6eba6a5.tar.gz
gentoo-7559106d73eb9f57fdee1e50bfca158be6eba6a5.tar.bz2
gentoo-7559106d73eb9f57fdee1e50bfca158be6eba6a5.zip
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
Diffstat (limited to 'dev-python/vcrpy')
-rw-r--r--dev-python/vcrpy/files/vcrpy-skip-network-tests.patch21
-rw-r--r--dev-python/vcrpy/vcrpy-1.11.1.ebuild6
-rw-r--r--dev-python/vcrpy/vcrpy-1.12.0.ebuild4
3 files changed, 30 insertions, 1 deletions
diff --git a/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch b/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
new file mode 100644
index 000000000000..a1f00aa77855
--- /dev/null
+++ b/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
@@ -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')
diff --git a/dev-python/vcrpy/vcrpy-1.11.1.ebuild b/dev-python/vcrpy/vcrpy-1.11.1.ebuild
index b50e9d02784c..0bc4604553ed 100644
--- a/dev-python/vcrpy/vcrpy-1.11.1.ebuild
+++ b/dev-python/vcrpy/vcrpy-1.11.1.ebuild
@@ -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
}
diff --git a/dev-python/vcrpy/vcrpy-1.12.0.ebuild b/dev-python/vcrpy/vcrpy-1.12.0.ebuild
index adfcee1807df..2676c4109733 100644
--- a/dev-python/vcrpy/vcrpy-1.12.0.ebuild
+++ b/dev-python/vcrpy/vcrpy-1.12.0.ebuild
@@ -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
}