MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_echo

Function test_echo

tests/test_cmd2.py:2047–2055  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

2045
2046
2047def test_echo(capsys) -> None:
2048 app = cmd2.Cmd()
2049 app.echo = True
2050 commands = ["help history"]
2051
2052 app.runcmds_plus_hooks(commands)
2053
2054 out, _err = capsys.readouterr()
2055 assert out.startswith(f"{app.prompt}{commands[0]}\nUsage: history")
2056
2057
2058@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 1

runcmds_plus_hooksMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…