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

Function test_hidden

tests/test_shell_completion.py:307–325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305
306
307def test_hidden():
308 cli = Group(
309 "cli",
310 commands=[
311 Command(
312 "hidden",
313 add_help_option=False,
314 hidden=True,
315 params=[
316 Option(["-a"]),
317 Option(["-b"], type=Choice(["a", "b"]), hidden=True),
318 ],
319 )
320 ],
321 )
322 assert "hidden" not in _get_words(cli, [], "")
323 assert "hidden" not in _get_words(cli, [], "hidden")
324 assert _get_words(cli, ["hidden"], "-") == ["-a"]
325 assert _get_words(cli, ["hidden", "-b"], "") == ["a", "b"]
326
327
328def test_add_different_name():

Callers

nothing calls this directly

Calls 5

GroupClass · 0.90
CommandClass · 0.90
OptionClass · 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…