A Group can be built with a dict of commands.
(runner)
| 84 | |
| 85 | |
| 86 | def 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 | |
| 98 | def test_group_from_list(runner): |