Skip to content

Commit 7f33f04

Browse files
authored
Merge pull request #389 from python-cmd2/subcommand_tests
Rename some test functions to fix #388
2 parents 132a788 + 7cd1263 commit 7f33f04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_completion.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -887,15 +887,15 @@ def test_cmd2_subcmd_with_unknown_completion_nomatch(scu_app):
887887
assert first_match is None
888888

889889

890-
def test_cmd2_help_subcommand_completion_single(scu_app):
890+
def test_cmd2_help_subcommand_completion_single_scu(scu_app):
891891
text = 'base'
892892
line = 'help {}'.format(text)
893893
endidx = len(line)
894894
begidx = endidx - len(text)
895895
assert scu_app.complete_help(text, line, begidx, endidx) == ['base']
896896

897897

898-
def test_cmd2_help_subcommand_completion_multiple(scu_app):
898+
def test_cmd2_help_subcommand_completion_multiple_scu(scu_app):
899899
text = ''
900900
line = 'help base {}'.format(text)
901901
endidx = len(line)
@@ -905,15 +905,15 @@ def test_cmd2_help_subcommand_completion_multiple(scu_app):
905905
assert matches == ['bar', 'foo', 'sport']
906906

907907

908-
def test_cmd2_help_subcommand_completion_nomatch(scu_app):
908+
def test_cmd2_help_subcommand_completion_nomatch_scu(scu_app):
909909
text = 'z'
910910
line = 'help base {}'.format(text)
911911
endidx = len(line)
912912
begidx = endidx - len(text)
913913
assert scu_app.complete_help(text, line, begidx, endidx) == []
914914

915915

916-
def test_subcommand_tab_completion(scu_app):
916+
def test_subcommand_tab_completion_scu(scu_app):
917917
# This makes sure the correct completer for the sport subcommand is called
918918
text = 'Foot'
919919
line = 'base sport {}'.format(text)
@@ -926,7 +926,7 @@ def test_subcommand_tab_completion(scu_app):
926926
assert first_match is not None and scu_app.completion_matches == ['Football ']
927927

928928

929-
def test_subcommand_tab_completion_with_no_completer(scu_app):
929+
def test_subcommand_tab_completion_with_no_completer_scu(scu_app):
930930
# This tests what happens when a subcommand has no completer
931931
# In this case, the foo subcommand has no completer defined
932932
text = 'Foot'
@@ -938,7 +938,7 @@ def test_subcommand_tab_completion_with_no_completer(scu_app):
938938
assert first_match is None
939939

940940

941-
def test_subcommand_tab_completion_space_in_text(scu_app):
941+
def test_subcommand_tab_completion_space_in_text_scu(scu_app):
942942
text = 'B'
943943
line = 'base sport "Space {}'.format(text)
944944
endidx = len(line)

0 commit comments

Comments
 (0)