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

Function test_nested_group

tests/test_shell_completion.py:59–75  ·  view source on GitHub ↗
(args: list[str], word: str, expect: list[str])

Source from the content-addressed store, hash-verified

57 ],
58)
59def test_nested_group(args: list[str], word: str, expect: list[str]) -> None:
60 cli = Group(
61 "cli",
62 commands=[
63 Group(
64 "get",
65 commands=[
66 Group(
67 "full",
68 params=[Option(["--verbose"])],
69 commands=[Command("data", params=[Option(["-a"])])],
70 )
71 ],
72 )
73 ],
74 )
75 assert _get_words(cli, args, word) == expect
76
77
78def test_group_command_same_option():

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…