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

Function test_get_help_topics_hidden

tests/test_cmd2.py:3590–3606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3588
3589
3590def 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
3609class ReplWithExitCode(cmd2.Cmd):

Callers

nothing calls this directly

Calls 3

get_help_topicsMethod · 0.80
appendMethod · 0.80
TestAppClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…