aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-03-16 20:02:39 +0100
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-03-16 20:02:39 +0100
commit69da648099044a98f094b746c4d0295baf843ea2 (patch)
tree2ec89c3ef7aea39affe42c0737057b6d49fef4e8 /setuptools/tests/test_easy_install.py
parent0b3d2302b8b209c7bed8bdad6e1a6cff34889779 (diff)
parentff3ee4aa6c6800d813162c09a58c6265c4675701 (diff)
downloadexternal_python_setuptools-69da648099044a98f094b746c4d0295baf843ea2.tar.gz
external_python_setuptools-69da648099044a98f094b746c4d0295baf843ea2.tar.bz2
external_python_setuptools-69da648099044a98f094b746c4d0295baf843ea2.zip
merge with upstream
--HG-- branch : distribute extra : rebase_source : 2ad13527b742644596b32fcd8feac7276b4a477e
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 071ba513..f2655d75 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -95,6 +95,31 @@ 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'])
+
+
class TestPTHFileWriter(unittest.TestCase):
def test_add_from_cwd_site_sets_dirty(self):
'''a pth file manager should set dirty
@@ -112,7 +137,6 @@ class TestPTHFileWriter(unittest.TestCase):
self.assertFalse(pth.dirty)
-
class TestUserInstallTest(unittest.TestCase):
def setUp(self):