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

Function test_group_commands_dict

tests/test_basic.py:86–95  ·  view source on GitHub ↗

A Group can be built with a dict of commands.

(runner)

Source from the content-addressed store, hash-verified

84
85
86def test_group_commands_dict(runner):
87 """A Group can be built with a dict of commands."""
88
89 @click.command()
90 def sub():
91 click.echo("sub", nl=False)
92
93 cli = click.Group(commands={"other": sub})
94 result = runner.invoke(cli, ["other"])
95 assert result.output == "sub"
96
97
98def test_group_from_list(runner):

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected