summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-04-29 13:03:05 -0600
committerkotfu <kotfu@kotfu.net>2018-04-29 13:05:07 -0600
commitc7fa6969ffde1247122a714b597d088ca6af9166 (patch)
tree84f8d3a078afa5a0d39ce07406ab7e7b6e746cc0
parent83fd707dcf9916c9f483e4417a2c3b2b083c8da2 (diff)
downloadcmd2-git-c7fa6969ffde1247122a714b597d088ca6af9166.tar.gz
Fix incorrect error message
-rwxr-xr-xcmd2/cmd2.py2
-rw-r--r--tests/test_cmd2.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 0c738991..360743ed 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -2719,7 +2719,7 @@ Usage: Usage: unalias [-a] name [name ...]
if args.all:
self.poutput('\nRead only settings:{}'.format(self.cmdenvironment()))
else:
- raise LookupError("Parameter '%s' not supported (type 'show' for list of parameters)." % param)
+ raise LookupError("Parameter '%s' not supported (type 'set' for list of parameters)." % param)
set_parser = ACArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
set_parser.add_argument('-a', '--all', action='store_true', help='display read-only settings as well')
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 9ec7f642..17760d4d 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -104,7 +104,6 @@ def test_base_show_readonly(base_app):
Commands may be terminated with: {}
Arguments at invocation allowed: {}
Output redirection and pipes allowed: {}
-
""".format(base_app.terminators, base_app.allow_cli_args, base_app.allow_redirection))
assert out == expected
@@ -167,7 +166,7 @@ def test_set_not_supported(base_app, capsys):
run_cmd(base_app, 'set qqq True')
out, err = capsys.readouterr()
expected = normalize("""
-EXCEPTION of type 'LookupError' occurred with message: 'Parameter 'qqq' not supported (type 'show' for list of parameters).'
+EXCEPTION of type 'LookupError' occurred with message: 'Parameter 'qqq' not supported (type 'set' for list of parameters).'
To enable full traceback, run the following command: 'set debug true'
""")
assert normalize(str(err)) == expected
@@ -1384,7 +1383,7 @@ def test_which_editor_bad():
class MultilineApp(cmd2.Cmd):
def __init__(self, *args, **kwargs):
- self.multilineCommands = ['orate']
+ self.multiline_commands = ['orate']
super().__init__(*args, **kwargs)
orate_parser = argparse.ArgumentParser()