diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-03 02:56:41 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-03 02:56:41 -0400 |
commit | 38f9da63fd11c8c32d256e9181ecdf5464754f17 (patch) | |
tree | b5d6010010ec67a6f98d3ee96a3250c0c92d9772 /tests | |
parent | 895b2da82db64d2d01c65be6ebc2489fd4914bbf (diff) | |
download | cmd2-git-38f9da63fd11c8c32d256e9181ecdf5464754f17.tar.gz |
Added unit test for categorized command without a docstring
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd2.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 3d57a105..ed281024 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1236,6 +1236,11 @@ class HelpCategoriesApp(cmd2.Cmd): """This command does diddly""" pass + # This command will be in the "Some Category" section of the help menu even though it has no docstring + @cmd2.with_category("Some Category") + def do_cat_nodoc(self, arg): + pass + def do_squat(self, arg): """This docstring help will never be shown because the help_squat method overrides it.""" pass @@ -1269,7 +1274,7 @@ edit squat Some Category ============= -diddly +cat_nodoc diddly Other ===== @@ -1292,6 +1297,7 @@ squat This command does diddly squat... Some Category ================================================================================ +cat_nodoc diddly This command does diddly Other |