Skip to content

Commit 67cea82

Browse files
committed
Increased code coverage
1 parent f797dae commit 67cea82

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_cmd2.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,10 @@ def test_disable_and_enable_category(disable_commands_app):
22172217
out = run_cmd(disable_commands_app, 'help has_no_help_func')
22182218
assert out == [message_to_print]
22192219

2220+
visible_commands = disable_commands_app.get_visible_commands()
2221+
assert 'has_help_func' not in visible_commands
2222+
assert 'has_no_help_func' not in visible_commands
2223+
22202224
# Enable the category
22212225
disable_commands_app.enable_category(disable_commands_app.category_name)
22222226

@@ -2233,6 +2237,10 @@ def test_disable_and_enable_category(disable_commands_app):
22332237
out = run_cmd(disable_commands_app, 'help has_no_help_func')
22342238
assert out == ["Help for has_no_help_func"]
22352239

2240+
visible_commands = disable_commands_app.get_visible_commands()
2241+
assert 'has_help_func' in visible_commands
2242+
assert 'has_no_help_func' in visible_commands
2243+
22362244
def test_enable_enabled_command(disable_commands_app):
22372245
# Test enabling a command that is not disabled
22382246
saved_len = len(disable_commands_app.disabled_commands)

0 commit comments

Comments
 (0)