()
| 3588 | |
| 3589 | |
| 3590 | def test_get_help_topics_hidden() -> None: |
| 3591 | # Verify get_help_topics() filters out hidden commands |
| 3592 | class TestApp(cmd2.Cmd): |
| 3593 | def __init__(self, *args, **kwargs) -> None: |
| 3594 | super().__init__(*args, **kwargs) |
| 3595 | |
| 3596 | def do_my_cmd(self, args) -> None: |
| 3597 | pass |
| 3598 | |
| 3599 | def help_my_cmd(self, args) -> None: |
| 3600 | pass |
| 3601 | |
| 3602 | app = TestApp() |
| 3603 | assert "my_cmd" in app.get_help_topics() |
| 3604 | |
| 3605 | app.hidden_commands.append("my_cmd") |
| 3606 | assert "my_cmd" not in app.get_help_topics() |
| 3607 | |
| 3608 | |
| 3609 | class ReplWithExitCode(cmd2.Cmd): |
nothing calls this directly
no test coverage detected
searching dependent graphs…