aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-03-13 16:53:19 -0500
committerTarek Ziade <tarek@ziade.org>2010-03-13 16:53:19 -0500
commit38ae8ecbdc6a9f285a56add8c695b10b2786c679 (patch)
tree420cfd5eba1d375bfa3471218cf3cdda07cb18ef /setuptools/tests/test_easy_install.py
parent9b4f204172ebab821cb677c978625c2e2479de5e (diff)
downloadexternal_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.tar.gz
external_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.tar.bz2
external_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.zip
added the --no-find-links option
--HG-- branch : distribute extra : rebase_source : fc2cbd4d369f7d5c77cae03e39354245b185cc60
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 95909ca7..6f660a1e 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -90,3 +90,28 @@ class TestEasyInstallTest(unittest.TestCase):
os.chdir(old_wd)
shutil.rmtree(dir)
+ def test_no_find_links(self):
+ # new option '--no-find-links', that blocks find-links added at
+ # the project level
+ dist = Distribution()
+ cmd = easy_install(dist)
+ cmd.check_pth_processing = lambda : True
+ cmd.no_find_links = True
+ cmd.find_links = ['link1', 'link2']
+ cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok')
+ cmd.args = ['ok']
+ cmd.ensure_finalized()
+ self.assertEquals(cmd.package_index.scanned_urls, {})
+
+ # let's try without it (default behavior)
+ cmd = easy_install(dist)
+ cmd.check_pth_processing = lambda : True
+ cmd.find_links = ['link1', 'link2']
+ cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok')
+ cmd.args = ['ok']
+ cmd.ensure_finalized()
+ keys = cmd.package_index.scanned_urls.keys()
+ keys.sort()
+ self.assertEquals(keys, ['link1', 'link2'])
+
+