MCPcopy
hub / github.com/pallets/click / test_group_command_same_option

Function test_group_command_same_option

tests/test_shell_completion.py:78–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77
78def test_group_command_same_option():
79 cli = Group(
80 "cli", params=[Option(["-a"])], commands=[Command("x", params=[Option(["-a"])])]
81 )
82 assert _get_words(cli, [], "-") == ["-a", "--help"]
83 assert _get_words(cli, ["-a", "a"], "-") == ["--help"]
84 assert _get_words(cli, ["-a", "a", "x"], "-") == ["-a", "--help"]
85 assert _get_words(cli, ["-a", "a", "x", "-a", "a"], "-") == ["--help"]
86
87
88def test_chained():

Callers

nothing calls this directly

Calls 4

GroupClass · 0.90
OptionClass · 0.90
CommandClass · 0.90
_get_wordsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…