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

Function test_cmdfinalization_stop_first

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

Source from the content-addressed store, hash-verified

868
869
870def test_cmdfinalization_stop_first(capsys) -> None:
871 app = PluggedApp()
872 app.register_cmdfinalization_hook(app.cmdfinalization_hook_stop)
873 app.register_cmdfinalization_hook(app.cmdfinalization_hook)
874 stop = app.onecmd_plus_hooks("say hello")
875 out, err = capsys.readouterr()
876 assert out == "hello\n"
877 assert not err
878 assert app.called_cmdfinalization == 2
879 assert stop
880
881
882def test_cmdfinalization_stop_second(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…