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

Function test_command

tests/test_shell_completion.py:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def test_command():
33 cli = Command("cli", params=[Option(["-t", "--test"])])
34 assert _get_words(cli, [], "") == []
35 assert _get_words(cli, [], "-") == ["-t", "--test", "--help"]
36 assert _get_words(cli, [], "--") == ["--test", "--help"]
37 assert _get_words(cli, [], "--t") == ["--test"]
38 # -t has been seen, so --test isn't suggested
39 assert _get_words(cli, ["-t", "a"], "-") == ["--help"]
40
41
42def test_group():

Callers

nothing calls this directly

Calls 3

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