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

Function test_with_color

tests/test_testing.py:212–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210
211
212def test_with_color():
213 @click.command()
214 def cli():
215 click.secho("hello world", fg="blue")
216
217 runner = CliRunner()
218
219 result = runner.invoke(cli)
220 assert result.output == "hello world\n"
221 assert not result.exception
222
223 result = runner.invoke(cli, color=True)
224 assert result.output == f"{click.style('hello world', fg='blue')}\n"
225 assert not result.exception
226
227
228def test_with_color_errors():

Callers

nothing calls this directly

Calls 2

invokeMethod · 0.95
CliRunnerClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…