From 4504c542825e77a2a7517f2e043b4edecbff8b88 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Sat, 16 Apr 2011 17:00:10 +0100 Subject: [PATCH] Use pypi query list to support multiple cli searches Issue #44 --- pip/commands/search.py | 2 +- tests/test_search.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pip/commands/search.py b/pip/commands/search.py index 561f0df135b..1a6bf9c5255 100644 --- a/pip/commands/search.py +++ b/pip/commands/search.py @@ -27,7 +27,7 @@ def run(self, options, args): if not args: logger.warn('ERROR: Missing required argument (search query).') return - query = ' '.join(args) + query = args index_url = options.index pypi_hits = self.search(query, index_url) diff --git a/tests/test_search.py b/tests/test_search.py index 74890ce6a92..27656becad8 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -50,6 +50,17 @@ def test_search(): assert 'pip installs packages' in output.stdout +def test_multiple_search(): + """ + End to end test of search command. + + """ + reset_env() + output = run_pip('search', 'pip', 'virtualenv') + assert 'pip installs packages' in output.stdout + assert 'Virtual Python Environment builder' in output.stdout + + def test_searching_through_Search_class(): """ Verify if ``pip.vcs.Search`` uses tests xmlrpclib.Transport class