diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-10 00:02:10 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-10 00:02:10 -0500 |
commit | 67cea8267051134179014bc167b79e0b0b5132d9 (patch) | |
tree | e57feff0a67fd6a0f6eee6f0513635ab87293606 /tests/test_cmd2.py | |
parent | f797daef64a529d205cf9db9a9b47e889686fa98 (diff) | |
download | cmd2-git-67cea8267051134179014bc167b79e0b0b5132d9.tar.gz |
Increased code coverage
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 45051f3a..5e9e4ce6 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -2217,6 +2217,10 @@ def test_disable_and_enable_category(disable_commands_app): out = run_cmd(disable_commands_app, 'help has_no_help_func') assert out == [message_to_print] + visible_commands = disable_commands_app.get_visible_commands() + assert 'has_help_func' not in visible_commands + assert 'has_no_help_func' not in visible_commands + # Enable the category disable_commands_app.enable_category(disable_commands_app.category_name) @@ -2233,6 +2237,10 @@ def test_disable_and_enable_category(disable_commands_app): out = run_cmd(disable_commands_app, 'help has_no_help_func') assert out == ["Help for has_no_help_func"] + visible_commands = disable_commands_app.get_visible_commands() + assert 'has_help_func' in visible_commands + assert 'has_no_help_func' in visible_commands + def test_enable_enabled_command(disable_commands_app): # Test enabling a command that is not disabled saved_len = len(disable_commands_app.disabled_commands) |