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

Function test_runner

tests/test_testing.py:15–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def test_runner():
16 @click.command()
17 def test():
18 i = click.get_binary_stream("stdin")
19 o = click.get_binary_stream("stdout")
20 while True:
21 chunk = i.read(4096)
22 if not chunk:
23 break
24 o.write(chunk)
25 o.flush()
26
27 runner = CliRunner()
28 result = runner.invoke(test, input="Hello World!\n")
29 assert not result.exception
30 assert result.output == "Hello World!\n"
31
32
33def test_echo_stdin_stream():

Callers

nothing calls this directly

Calls 2

invokeMethod · 0.95
CliRunnerClass · 0.90

Tested by

no test coverage detected