(capsys)
| 880 | |
| 881 | |
| 882 | def 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 | |
| 894 | def test_cmdfinalization_hook_exception(capsys) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…