MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / test_cmdfinalization_hook_passthrough_exception

Function test_cmdfinalization_hook_passthrough_exception

tests/test_plugin.py:947–954  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

945
946
947def test_cmdfinalization_hook_passthrough_exception() -> None:
948 app = PluggedApp()
949 app.register_cmdfinalization_hook(app.cmdfinalization_hook_passthrough_exception)
950
951 expected_err = "Pass me up"
952 with pytest.raises(OSError, match=expected_err):
953 app.onecmd_plus_hooks("say hello")
954 assert app.called_cmdfinalization == 1
955
956
957def test_skip_postcmd_hooks(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…