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

Function test_multiple_macros

tests/test_cmd2.py:3119–3129  ·  view source on GitHub ↗
(base_app)

Source from the content-addressed store, hash-verified

3117
3118
3119def test_multiple_macros(base_app) -> None:
3120 macro1 = "h1"
3121 macro2 = "h2"
3122 run_cmd(base_app, f"macro create {macro1} help")
3123 run_cmd(base_app, f"macro create {macro2} help -v")
3124 out, _err = run_cmd(base_app, macro1)
3125 verify_help_text(base_app, out)
3126
3127 out2, _err2 = run_cmd(base_app, macro2)
3128 verify_help_text(base_app, out2)
3129 assert len(out2) > len(out)
3130
3131
3132def test_nonexistent_macro(base_app) -> None:

Callers

nothing calls this directly

Calls 2

run_cmdFunction · 0.85
verify_help_textFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…