dev-python/virtualenv-16.7.7: Enable FEATURES="test"
authorPatrick McLean <patrick.mclean@sony.com>
Sat, 23 Nov 2019 00:57:31 +0000 (16:57 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Sat, 23 Nov 2019 00:57:50 +0000 (16:57 -0800)
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>
dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch [new file with mode: 0644]
dev-python/virtualenv/virtualenv-16.7.7.ebuild

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 (file)
index 0000000..97baeb5
--- /dev/null
@@ -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):
index cb3757140702cbe0feb0ad69cf5c243bd4e6549f..0c593103eb949fc0db022657719deae18aec8d6a 100644 (file)
@@ -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() {