(capsys)
| 448 | |
| 449 | |
| 450 | def test_postparsing_hook_stop_first(capsys) -> None: |
| 451 | app = PluggedApp() |
| 452 | app.register_postparsing_hook(app.postparse_hook_stop) |
| 453 | stop = app.onecmd_plus_hooks("say hello") |
| 454 | assert app.called_postparsing == 1 |
| 455 | assert stop |
| 456 | |
| 457 | # register another function but it shouldn't be called |
| 458 | app.reset_counters() |
| 459 | app.register_postparsing_hook(app.postparse_hook) |
| 460 | stop = app.onecmd_plus_hooks("say hello") |
| 461 | assert app.called_postparsing == 1 |
| 462 | assert stop |
| 463 | |
| 464 | |
| 465 | def test_postparsing_hook_stop_second(capsys) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…