(base_app: cmd2.Cmd)
| 4059 | |
| 4060 | |
| 4061 | def test_help_disabled_no_help_func(base_app: cmd2.Cmd) -> None: |
| 4062 | from cmd2.cmd2 import DisabledCommand |
| 4063 | |
| 4064 | # Intentionally bypass disable_command() to test the fallback in do_help() |
| 4065 | command = "quit" |
| 4066 | command_func = cast(BoundCommandFunc, base_app.get_command_func(command)) |
| 4067 | base_app.disabled_commands[command] = DisabledCommand(command_func=command_func, help_func=None, completer_func=None) |
| 4068 | |
| 4069 | _out, err = run_cmd(base_app, f"help {command}") |
| 4070 | assert err[0].startswith(f"{command} is currently disabled.") |
| 4071 | |
| 4072 | |
| 4073 | def test_register_command_in_enabled_category(disable_commands_app) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…