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

Function test_int_option

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

Source from the content-addressed store, hash-verified

141 ],
142)
143def 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(

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected