(runner, args, expect)
| 192 | ], |
| 193 | ) |
| 194 | def test_float_option(runner, args, expect): |
| 195 | @click.command() |
| 196 | @click.option("--f", default=42.0) |
| 197 | def cli(f): |
| 198 | click.echo(f"F:[{f}]") |
| 199 | |
| 200 | result = runner.invoke(cli, args) |
| 201 | assert expect in result.output |
| 202 | |
| 203 | if expect.startswith("Error:"): |
| 204 | assert result.exception is not None |
| 205 | else: |
| 206 | assert result.exception is None |
| 207 | |
| 208 | |
| 209 | @pytest.mark.parametrize( |