summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--tests/test_cmd2.py14
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