summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-12-28 21:44:02 -0500
committerGitHub <noreply@github.com>2020-12-28 21:44:02 -0500
commitce8f29faedebac4312d60c34b42e63e79e8f76f4 (patch)
treee7de441c5a10a1f35646cb83110556dbbce7d88a
parent36233fe32c300e8e6b7c4d3ce53b37f23af24933 (diff)
parent3d4b6b0b15c6a78397a704194bcd5037d8382c1d (diff)
downloadpython-setuptools-git-ce8f29faedebac4312d60c34b42e63e79e8f76f4.tar.gz
Merge pull request #2515 from pypa/bugfix/safe-test-test
Avoid hitting network during test_virtualenv.test_test_command.
-rw-r--r--changelog.d/2525.patch.rst1
-rw-r--r--setuptools/tests/test_virtualenv.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/changelog.d/2525.patch.rst b/changelog.d/2525.patch.rst
new file mode 100644
index 00000000..8b590dce
--- /dev/null
+++ b/changelog.d/2525.patch.rst
@@ -0,0 +1 @@
+Avoid hitting network during test_virtualenv.test_test_command.
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py
index 21dea5bb..5a942d84 100644
--- a/setuptools/tests/test_virtualenv.py
+++ b/setuptools/tests/test_virtualenv.py
@@ -179,6 +179,10 @@ def test_test_command_install_requirements(virtualenv, tmpdir):
# Ensure pip/wheel packages are installed.
virtualenv.run(
"python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"")
+ # uninstall setuptools so that 'setup.py develop' works
+ virtualenv.run("python -m pip uninstall -y setuptools")
+ # disable index URL so bits and bobs aren't requested from PyPI
+ virtualenv.env['PIP_NO_INDEX'] = '1'
_check_test_command_install_requirements(virtualenv, tmpdir)