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

Function test_argument_default

tests/test_shell_completion.py:130–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129
130def test_argument_default():
131 cli = Command(
132 "cli",
133 add_help_option=False,
134 params=[
135 Argument(["a"], type=Choice(["a"]), default="a"),
136 Argument(["b"], type=Choice(["b"]), default="b"),
137 ],
138 )
139 assert _get_words(cli, [], "") == ["a"]
140 assert _get_words(cli, ["a"], "b") == ["b"]
141 # ignore type validation
142 assert _get_words(cli, ["x"], "b") == ["b"]
143
144
145def test_type_choice():

Callers

nothing calls this directly

Calls 4

CommandClass · 0.90
ArgumentClass · 0.90
ChoiceClass · 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…