Skip to content

Commit 1381c72

Browse files
committed
Updated CHANGELOG and comment.
1 parent 907fa3a commit 1381c72

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

tests/test_cmd2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4017,14 +4017,15 @@ def test_disabled_command_not_in_history(disable_commands_app) -> None:
40174017

40184018

40194019
def 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

0 commit comments

Comments
 (0)