diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-15 23:37:10 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-15 23:37:10 -0400 |
commit | 1820ebe60a4d059b6f016041fe9b401758ae321e (patch) | |
tree | 51e7933c21af8fa5393024f99cdec702feb705a7 /tests/test_argparse_completer.py | |
parent | 94b424e9c41f99c6eb268c6c97f09e99a8342de8 (diff) | |
download | cmd2-git-1820ebe60a4d059b6f016041fe9b401758ae321e.tar.gz |
Renamed matches_sort_key to default_sort_key and using it to sort additional d
Diffstat (limited to 'tests/test_argparse_completer.py')
-rw-r--r-- | tests/test_argparse_completer.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_argparse_completer.py b/tests/test_argparse_completer.py index 4ad4c560..19ec551b 100644 --- a/tests/test_argparse_completer.py +++ b/tests/test_argparse_completer.py @@ -263,7 +263,7 @@ def test_complete_help(ac_app, command, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('command_and_args, text, completions', [ @@ -320,7 +320,7 @@ def test_autcomp_flag_completion(ac_app, command_and_args, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('flag, text, completions', [ @@ -346,7 +346,7 @@ def test_autocomp_flag_choices_completion(ac_app, flag, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('pos, text, completions', [ @@ -369,7 +369,7 @@ def test_autocomp_positional_choices_completion(ac_app, pos, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('flag, text, completions', [ @@ -389,7 +389,7 @@ def test_autocomp_flag_completers(ac_app, flag, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('pos, text, completions', [ @@ -410,7 +410,7 @@ def test_autocomp_positional_completers(ac_app, pos, text, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) def test_autocomp_blank_token(ac_app): @@ -548,7 +548,7 @@ def test_autcomp_nargs(ac_app, args, completions): else: assert first_match is None - assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key) + assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key) @pytest.mark.parametrize('command_and_args, text, is_error', [ |