(runner, args, expect)
| 141 | ], |
| 142 | ) |
| 143 | def test_int_option(runner, args, expect): |
| 144 | @click.command() |
| 145 | @click.option("--i", default=42) |
| 146 | def cli(i): |
| 147 | click.echo(f"I:[{i * 2}]") |
| 148 | |
| 149 | result = runner.invoke(cli, args) |
| 150 | assert expect in result.output |
| 151 | |
| 152 | if expect.startswith("Error:"): |
| 153 | assert result.exception is not None |
| 154 | else: |
| 155 | assert result.exception is None |
| 156 | |
| 157 | |
| 158 | @pytest.mark.parametrize( |