(runner, args, expect)
| 167 | ], |
| 168 | ) |
| 169 | def test_uuid_option(runner, args, expect): |
| 170 | @click.command() |
| 171 | @click.option( |
| 172 | "--u", default="ba122011-349f-423b-873b-9d6a79c688ab", type=click.UUID |
| 173 | ) |
| 174 | def cli(u): |
| 175 | click.echo(f"U:[{u}]") |
| 176 | |
| 177 | result = runner.invoke(cli, args) |
| 178 | assert expect in result.output |
| 179 | |
| 180 | if expect.startswith("Error:"): |
| 181 | assert result.exception is not None |
| 182 | else: |
| 183 | assert result.exception is None |
| 184 | |
| 185 | |
| 186 | @pytest.mark.parametrize( |