diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-08-21 21:46:53 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-08-21 21:46:53 -0400 |
commit | 4db8dc3c0ebb7d56abc9ccf0f37f501d0a03a170 (patch) | |
tree | 1049700ccb2a62c266ad95b8834cdb4dc0726584 | |
parent | fe83dc063216e80c99e4e429494d56e36d4dc055 (diff) | |
download | cmd2-git-4db8dc3c0ebb7d56abc9ccf0f37f501d0a03a170.tar.gz |
Updated changelog
Also:
- Added unit tests for get_all_commands() and get_help_topcis() methods
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | tests/test_cmd2.py | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f71a906f..e08e5a75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 (TBD, 2018) +* Bug Fixes + * Fixed bug where ``get_all_commands`` could return non-callable attributes + ## 0.9.4 (August 21, 2018) * Bug Fixes * Fixed bug where ``preparse`` was not getting called diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 0ec993e9..d9ef5e78 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1916,3 +1916,17 @@ def test_bad_history_file_path(capsys, request): else: # GNU readline raises an exception upon trying to read the directory as a file assert 'readline cannot read' in err + + + +def test_get_all_commands(base_app): + # Verify that the base app has the expected commands + commands = base_app.get_all_commands() + expected_commands = ['_relative_load', 'alias', 'edit', 'eof', 'eos', 'help', 'history', 'load', 'py', 'pyscript', + 'quit', 'set', 'shell', 'shortcuts', 'unalias'] + assert commands == expected_commands + +def test_get_help_topics(base_app): + # Verify that the base app has no additional help_foo methods + custom_help = base_app.get_help_topics() + assert len(custom_help) == 0 |