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

Function test

tests/test_testing.py:17–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 3

readMethod · 0.80
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected