summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-24 19:32:13 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-24 19:32:13 -0400
commit850b234a352d5140c5959ed9245b355e6837b529 (patch)
tree1a88e7661100193c4b063e3ac6f48b97cb2cbe64
parent5d8ac434ec81bb50eb4e4650885f79347f302cca (diff)
downloadcmd2-git-850b234a352d5140c5959ed9245b355e6837b529.tar.gz
Changed unit test to handle docstring lines that start with :
-rw-r--r--tests/test_cmd2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 4b0687c9..7a8a52a0 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -46,6 +46,11 @@ def test_base_help_verbose(base_app):
expected = normalize(BASE_HELP_VERBOSE)
assert out == expected
+ # Make sure :param type lines are filtered out of help summary
+ help_doc = base_app.do_help.__func__.__doc__
+ help_doc += "\n:param fake param"
+ base_app.do_help.__func__.__doc__ = help_doc
+
out = run_cmd(base_app, 'help --verbose')
assert out == expected