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

Function test_float_option

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

Source from the content-addressed store, hash-verified

192 ],
193)
194def 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(

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected