(runner)
| 11 | |
| 12 | |
| 13 | def test_basic_functionality(runner): |
| 14 | @click.command() |
| 15 | def cli(): |
| 16 | """Hello World!""" |
| 17 | click.echo("I EXECUTED") |
| 18 | |
| 19 | result = runner.invoke(cli, ["--help"]) |
| 20 | assert not result.exception |
| 21 | assert "Hello World!" in result.output |
| 22 | assert "Show this message and exit." in result.output |
| 23 | assert result.exit_code == 0 |
| 24 | assert "I EXECUTED" not in result.output |
| 25 | |
| 26 | result = runner.invoke(cli, []) |
| 27 | assert not result.exception |
| 28 | assert "I EXECUTED" in result.output |
| 29 | assert result.exit_code == 0 |
| 30 | |
| 31 | |
| 32 | def test_repr(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…