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

Function test_cmdfinalization_stop_second

tests/test_plugin.py:882–891  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

880
881
882def test_cmdfinalization_stop_second(capsys) -> None:
883 app = PluggedApp()
884 app.register_cmdfinalization_hook(app.cmdfinalization_hook)
885 app.register_cmdfinalization_hook(app.cmdfinalization_hook_stop)
886 stop = app.onecmd_plus_hooks("say hello")
887 out, err = capsys.readouterr()
888 assert out == "hello\n"
889 assert not err
890 assert app.called_cmdfinalization == 2
891 assert stop
892
893
894def test_cmdfinalization_hook_exception(capsys) -> None:

Callers

nothing calls this directly

Calls 3

PluggedAppClass · 0.85
onecmd_plus_hooksMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…