Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename 'status' command 'show'.

  • Loading branch information...
commit 8c9a241fb27dd8a7c690f0efdfeffb05dd74256d 1 parent 85bbe26
@carljm carljm authored
View
2  docs/news.txt
@@ -22,7 +22,7 @@ develop (unreleased)
* Added support for --no-index in requirements files.
-* Added "pip status" command to get information about an installed
+* Added "pip show" command to get information about an installed
package. Fixes #131. Thanks Kelsey Hightower and Rafael Caricio.
1.2.1 (2012-09-06)
View
10 pip/commands/status.py → pip/commands/show.py
@@ -4,19 +4,19 @@
from pip.log import logger
-class StatusCommand(Command):
- name = 'status'
+class ShowCommand(Command):
+ name = 'show'
usage = '%prog QUERY'
summary = 'Output installed distributions (exact versions, files) to stdout'
def __init__(self):
- super(StatusCommand, self).__init__()
+ super(ShowCommand, self).__init__()
self.parser.add_option(
'-f', '--files',
dest='files',
action='store_true',
default=False,
- help='If should show a full list of files for every installed package')
+ help='Show the full list of installed files for each package')
def run(self, options, args):
if not args:
@@ -74,4 +74,4 @@ def print_results(distributions, list_all_files):
logger.notify("Cannot locate installed-files.txt")
-StatusCommand()
+ShowCommand()
View
24 tests/test_status.py → tests/test_show.py
@@ -1,16 +1,16 @@
import re
from pip import __version__
-from pip.commands.status import search_packages_info
+from pip.commands.show import search_packages_info
from tests.test_pip import reset_env, run_pip
-def test_status():
+def test_show():
"""
- Test end to end test for status command.
+ Test end to end test for show command.
"""
reset_env()
- result = run_pip('status', 'pip')
+ result = run_pip('show', 'pip')
lines = result.stdout.split('\n')
assert len(lines) == 5
assert lines[0] == '---', lines[0]
@@ -19,14 +19,14 @@ def test_status():
assert lines[3].startswith('Location: '), lines[3]
-def test_status_with_files_not_found():
+def test_show_with_files_not_found():
"""
- Test for status command with installed files listing enabled and
+ Test for show command with installed files listing enabled and
installed-files.txt not found.
"""
reset_env()
- result = run_pip('status', '-f', 'pip')
+ result = run_pip('show', '-f', 'pip')
lines = result.stdout.split('\n')
assert len(lines) == 7
assert lines[0] == '---', lines[0]
@@ -37,24 +37,24 @@ def test_status_with_files_not_found():
assert lines[5] == 'Cannot locate installed-files.txt', lines[5]
-def test_status_with_all_files():
+def test_show_with_all_files():
"""
- Test listing all files in the status command.
+ Test listing all files in the show command.
"""
reset_env()
result = run_pip('install', 'initools==0.2')
- result = run_pip('status', '--files', 'initools')
+ result = run_pip('show', '--files', 'initools')
assert re.search(r"Files:\n( .+\n)+", result.stdout)
def test_missing_argument():
"""
- Test status command with no arguments.
+ Test show command with no arguments.
"""
reset_env()
- result = run_pip('status')
+ result = run_pip('show')
assert 'ERROR: Please provide a project name or names.' in result.stdout
Please sign in to comment.
Something went wrong with that request. Please try again.