A Group can be built with a list of commands.
(runner)
| 96 | |
| 97 | |
| 98 | def test_group_from_list(runner): |
| 99 | """A Group can be built with a list of commands.""" |
| 100 | |
| 101 | @click.command() |
| 102 | def sub(): |
| 103 | click.echo("sub", nl=False) |
| 104 | |
| 105 | cli = click.Group(commands=[sub]) |
| 106 | result = runner.invoke(cli, ["sub"]) |
| 107 | assert result.output == "sub" |
| 108 | |
| 109 | |
| 110 | @pytest.mark.parametrize( |