MCPcopy
hub / github.com/pallets/click / test_uuid_option

Function test_uuid_option

tests/test_basic.py:169–183  ·  view source on GitHub ↗
(runner, args, expect)

Source from the content-addressed store, hash-verified

167 ],
168)
169def 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(

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected