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

Function test_string_option

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

Source from the content-addressed store, hash-verified

118 ],
119)
120def test_string_option(runner, args, expect):
121 @click.command()
122 @click.option("--s", default="no value")
123 def cli(s):
124 click.echo(f"S:[{s}]")
125
126 result = runner.invoke(cli, args)
127 assert expect in result.output
128
129 if expect.startswith("Error:"):
130 assert result.exception is not None
131 else:
132 assert result.exception is None
133
134
135@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…