diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | cliff/help.py | 2 | ||||
-rw-r--r-- | cliff/tests/test_help.py | 3 |
3 files changed, 6 insertions, 3 deletions
@@ -34,3 +34,7 @@ pip-log.txt # pbr output AUTHORS ChangeLog + +# Editors +*~ +.*.swp diff --git a/cliff/help.py b/cliff/help.py index 3569ccc..a0b49e2 100644 --- a/cliff/help.py +++ b/cliff/help.py @@ -67,7 +67,7 @@ class HelpCommand(Command): if not fuzzy_matches: raise self.app.stdout.write('Command "%s" matches:\n' % cmd) - for fm in fuzzy_matches: + for fm in sorted(fuzzy_matches): self.app.stdout.write(' %s\n' % fm) return self.app_args.cmd = search_args diff --git a/cliff/tests/test_help.py b/cliff/tests/test_help.py index 19eaedc..3b44899 100644 --- a/cliff/tests/test_help.py +++ b/cliff/tests/test_help.py @@ -47,8 +47,7 @@ def test_list_matching_commands(): pass help_output = stdout.getvalue() assert 'Command "t" matches:' in help_output - assert 'two' in help_output - assert 'three' in help_output + assert 'three word command\n two words\n' in help_output def test_list_matching_commands_no_match(): |