File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ prompt is displayed.
9696 - Replaced the global ` APP_THEME ` constant in ` rich_utils.py ` with ` get_theme() ` and
9797 ` set_theme() ` functions to support lazy initialization and safer in-place updates of the
9898 theme.
99+ - Renamed ` Cmd._command_parsers ` to ` Cmd.command_parsers ` .
99100- Enhancements
100101 - New ` cmd2.Cmd ` parameters
101102 - ** auto_suggest** : (boolean) if ` True ` , provide fish shell style auto-suggestions. These
Original file line number Diff line number Diff line change @@ -4017,14 +4017,15 @@ def test_disabled_command_not_in_history(disable_commands_app) -> None:
40174017
40184018
40194019def test_get_parser_while_disabled (disable_commands_app : DisableCommandsApp ) -> None :
4020+ """Test that command_parsers can find a disabled command's parser."""
40204021 # Get parser before disabling
40214022 parser_before = disable_commands_app .command_parsers .get (disable_commands_app .do_argparse_command )
40224023 assert parser_before is not None
40234024
40244025 # Disable command
40254026 disable_commands_app .disable_command ("argparse_command" , "Disabled" )
40264027
4027- # Get parser after disabling - this is what was failing (returning None)
4028+ # Get parser after disabling
40284029 parser_after = disable_commands_app .command_parsers .get (disable_commands_app .do_argparse_command )
40294030 assert parser_after is not None
40304031 assert parser_after is parser_before
You can’t perform that action at this time.
0 commit comments