summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2019-11-22 16:57:31 -0800
committerPatrick McLean <chutzpah@gentoo.org>2019-11-22 16:57:50 -0800
commiteedff3bd6934014f208140f018cf3caa45d48a51 (patch)
tree058161dd3487715e428deb45e658797f63dea51f /dev-python/virtualenv
parentdev-util/desktop-file-utils: arm64 stable (bug #700632) (diff)
downloadgentoo-eedff3bd6934014f208140f018cf3caa45d48a51.tar.gz
gentoo-eedff3bd6934014f208140f018cf3caa45d48a51.tar.bz2
gentoo-eedff3bd6934014f208140f018cf3caa45d48a51.zip
dev-python/virtualenv-16.7.7: Enable FEATURES="test"
This adds a patch to disable tests that need internet access so tests can work with FEATURES="network-sandbox". The patch can removed to run the full test suite (with FEATURES="-network-sandbox") Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/virtualenv')
-rw-r--r--dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch50
-rw-r--r--dev-python/virtualenv/virtualenv-16.7.7.ebuild8
2 files changed, 54 insertions, 4 deletions
diff --git a/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch b/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch
new file mode 100644
index 000000000000..97baeb59c4eb
--- /dev/null
+++ b/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch
@@ -0,0 +1,50 @@
+diff --git a/tests/test_from_source.py b/tests/test_from_source.py
+index 39d7c05..76834f7 100644
+--- a/tests/test_from_source.py
++++ b/tests/test_from_source.py
+@@ -40,6 +40,7 @@ def test_use_from_source_sdist(sdist, tmp_path, clean_python, monkeypatch, call_
+ )
+
+
++@pytest.mark.skip(reason="needs internet access")
+ def test_use_from_wheel(tmp_path, extracted_wheel, clean_python, monkeypatch, call_subprocess):
+ """test that we can create a virtual environment by feeding to a clean python the wheels content"""
+ virtualenv_file = extracted_wheel / "virtualenv.py"
+diff --git a/tests/test_source_content.py b/tests/test_source_content.py
+index 8eae6bc..06763ee 100644
+--- a/tests/test_source_content.py
++++ b/tests/test_source_content.py
+@@ -41,6 +41,7 @@ def test_sdist_contains(sdist):
+ assert not extra, " | ".join(extra)
+
+
++@pytest.mark.skip(reason="needs internet access")
+ def test_wheel_contains(extracted_wheel):
+ content = set(extracted_wheel.iterdir())
+
+diff --git a/tests/test_zipapp.py b/tests/test_zipapp.py
+index d084af6..93d29e1 100644
+--- a/tests/test_zipapp.py
++++ b/tests/test_zipapp.py
+@@ -51,11 +51,13 @@ def call_wheel(tmp_path_factory, call_subprocess):
+ return wheel_make_env
+
+
++@pytest.mark.skip(reason="needs internet access")
+ @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2")
+ def test_zipapp_basic_invocation(call_zipapp, tmp_path):
+ _test_basic_invocation(call_zipapp, tmp_path)
+
+
++@pytest.mark.skip(reason="needs internet access")
+ @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2")
+ def test_wheel_basic_invocation(call_wheel, tmp_path):
+ _test_basic_invocation(call_wheel, tmp_path)
+@@ -97,6 +99,7 @@ def test_zipapp_invocation_dash_p(call_zipapp, tmp_path):
+ _test_invocation_dash_p(call_zipapp, tmp_path)
+
+
++@pytest.mark.skip(reason="needs internet access")
+ @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2")
+ @pytest.mark.skipif(sys.platform == "win32" and six.PY2, reason="no python 3 for windows on CI")
+ def test_wheel_invocation_dash_p(call_wheel, tmp_path):
diff --git a/dev-python/virtualenv/virtualenv-16.7.7.ebuild b/dev-python/virtualenv/virtualenv-16.7.7.ebuild
index cb3757140702..0c593103eb94 100644
--- a/dev-python/virtualenv/virtualenv-16.7.7.ebuild
+++ b/dev-python/virtualenv/virtualenv-16.7.7.ebuild
@@ -43,14 +43,14 @@ BDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]
DOCS=( docs/index.rst docs/changes.rst )
-# tests need internet access
-RESTRICT="test"
-
# uncomment if line above is removed
-#RESTRICT="!test? ( test )"
+RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/virtualenv-16.7.7-tests.patch"
+
+ # disable tests that need internet access
+ "${FILESDIR}/virtualenv-16.7.7-tests-internet.patch"
)
python_check_deps() {