aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2019-11-16 23:30:10 +0100
committerBenoit Pierre <benoit.pierre@gmail.com>2019-11-16 23:30:10 +0100
commita1e956b20f11f2d02f5a9855bda37660080184c9 (patch)
tree1f83221e605be161feff5bbea1e1c2fefef33011 /setuptools/tests/test_easy_install.py
parent68dbb703705cdd64e25261a6fcc1c0cc96bcf431 (diff)
downloadexternal_python_setuptools-a1e956b20f11f2d02f5a9855bda37660080184c9.tar.gz
external_python_setuptools-a1e956b20f11f2d02f5a9855bda37660080184c9.tar.bz2
external_python_setuptools-a1e956b20f11f2d02f5a9855bda37660080184c9.zip
Revert "drop easy_install script and associated documentation"
This reverts commit 6e1838a9fb5feb000ba9b6a3c37c8b39d7e872b3.
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py34
1 files changed, 16 insertions, 18 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 68319c2f..aa75899a 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -467,24 +467,22 @@ class TestSetupRequires:
"""
monkeypatch.setenv(str('PIP_RETRIES'), str('0'))
monkeypatch.setenv(str('PIP_TIMEOUT'), str('0'))
- monkeypatch.setenv(str('PIP_VERBOSE'), str('1'))
- # create an sdist that has a build-time dependency.
- with TestSetupRequires.create_sdist() as dist_file:
- with contexts.tempdir() as temp_dir:
- setup_py = os.path.join(temp_dir, 'setup.py')
- with open(setup_py, 'w') as fp:
- fp.write('__import__("setuptools").setup()')
- temp_install_dir = os.path.join(temp_dir, 'target')
- os.mkdir(temp_install_dir)
- with contexts.environment(PYTHONPATH=temp_install_dir):
- # attempt to install the dist. It should
- # fail because it doesn't exist.
- with pytest.raises(SystemExit):
- run_setup(setup_py, ['easy_install',
- '--exclude-scripts',
- '--index-url', mock_index.url,
- '--install-dir', temp_install_dir,
- dist_file])
+ with contexts.quiet():
+ # create an sdist that has a build-time dependency.
+ with TestSetupRequires.create_sdist() as dist_file:
+ with contexts.tempdir() as temp_install_dir:
+ with contexts.environment(PYTHONPATH=temp_install_dir):
+ ei_params = [
+ '--index-url', mock_index.url,
+ '--exclude-scripts',
+ '--install-dir', temp_install_dir,
+ dist_file,
+ ]
+ with sandbox.save_argv(['easy_install']):
+ # attempt to install the dist. It should
+ # fail because it doesn't exist.
+ with pytest.raises(SystemExit):
+ easy_install_pkg.main(ei_params)
# there should have been one requests to the server
assert [r.path for r in mock_index.requests] == ['/does-not-exist/']