diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2019-11-23 14:16:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-23 14:16:53 -0500 |
| commit | e44d9bcd4288bed098f09b24c3667ef02621699d (patch) | |
| tree | 9d47f5b97523580de6fa2dc449f6ca630226503b /setuptools/tests | |
| parent | e31c9f0c37e545022f5c0cdacd28ab4432b1a6df (diff) | |
| parent | 4188aba5265e9b7145b1c5ed10c8e0ae769f70b4 (diff) | |
| download | python-setuptools-git-e44d9bcd4288bed098f09b24c3667ef02621699d.tar.gz | |
Merge pull request #1909 from benoit-pierre/resurrect_easy_install_script
Revert "drop easy_install script and associated documentation"
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 34 | ||||
| -rw-r--r-- | setuptools/tests/test_namespaces.py | 5 |
2 files changed, 19 insertions, 20 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/'] diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 3c5df68a..f937d981 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -64,8 +64,9 @@ class TestNamespaces: target.mkdir() install_cmd = [ sys.executable, - '-m', 'pip.__main__', 'install', - '-t', str(target), str(pkg), + '-m', 'easy_install', + '-d', str(target), + str(pkg), ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(install_cmd) |
