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

Function test_basic_functionality

tests/test_basic.py:13–29  ·  view source on GitHub ↗
(runner)

Source from the content-addressed store, hash-verified

11
12
13def test_basic_functionality(runner):
14 @click.command()
15 def cli():
16 """Hello World!"""
17 click.echo("I EXECUTED")
18
19 result = runner.invoke(cli, ["--help"])
20 assert not result.exception
21 assert "Hello World!" in result.output
22 assert "Show this message and exit." in result.output
23 assert result.exit_code == 0
24 assert "I EXECUTED" not in result.output
25
26 result = runner.invoke(cli, [])
27 assert not result.exception
28 assert "I EXECUTED" in result.output
29 assert result.exit_code == 0
30
31
32def test_repr():

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…