diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-03 10:45:40 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-03 10:45:40 -0400 |
commit | eafde2c8f2870bbe61084c73783b71a3329cafa0 (patch) | |
tree | d18fccee95c6099ef3df902d4fe2c701acab842e /setuptools/tests/test_easy_install.py | |
parent | f86079e4b6629d75a4650be64bdcbe89724138a8 (diff) | |
download | external_python_setuptools-eafde2c8f2870bbe61084c73783b71a3329cafa0.tar.gz external_python_setuptools-eafde2c8f2870bbe61084c73783b71a3329cafa0.tar.bz2 external_python_setuptools-eafde2c8f2870bbe61084c73783b71a3329cafa0.zip |
easy_install once again honors setup.cfg if found in the current directory
--HG--
branch : Setuptools-Distribute merge
extra : source : 422fc7e84eb2a22aa13df44dea6f138d7c840e83
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r-- | setuptools/tests/test_easy_install.py | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4a65a8d2..395056e7 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,7 +13,7 @@ import StringIO import distutils.core from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, main +from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -84,41 +84,6 @@ class TestEasyInstallTest(unittest.TestCase): self.assertEqual(script, WANTED) - def test_no_setup_cfg(self): - # makes sure easy_install as a command (main) - # doesn't use a setup.cfg file that is located - # in the current working directory - dir = tempfile.mkdtemp() - setup_cfg = open(os.path.join(dir, 'setup.cfg'), 'w') - setup_cfg.write('[easy_install]\nfind_links = http://example.com') - setup_cfg.close() - setup_py = open(os.path.join(dir, 'setup.py'), 'w') - setup_py.write(SETUP_PY) - setup_py.close() - - from setuptools.dist import Distribution - - def _parse_command_line(self): - msg = 'Error: a local setup.cfg was used' - opts = self.command_options - if 'easy_install' in opts: - assert 'find_links' not in opts['easy_install'], msg - return self._old_parse_command_line() - - Distribution._old_parse_command_line = Distribution.parse_command_line - Distribution.parse_command_line = _parse_command_line - - old_wd = os.getcwd() - try: - os.chdir(dir) - reset_setup_stop_context( - lambda: self.assertRaises(SystemExit, main, []) - ) - finally: - os.chdir(old_wd) - shutil.rmtree(dir) - Distribution.parse_command_line = Distribution._old_parse_command_line - def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at # the project level |