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

Function test_boolean_conversion

tests/test_basic.py:266–276  ·  view source on GitHub ↗
(runner, value, expect)

Source from the content-addressed store, hash-verified

264 ),
265)
266def test_boolean_conversion(runner, value, expect):
267 @click.command()
268 @click.option("--flag", type=bool)
269 def cli(flag):
270 click.echo(flag, nl=False)
271
272 result = runner.invoke(cli, ["--flag", value])
273 assert result.output == expect
274
275 result = runner.invoke(cli, ["--flag", value.title()])
276 assert result.output == expect
277
278
279@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected