summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)