summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2018-04-20 15:50:53 -0400
committerEric Lin <anselor@gmail.com>2018-04-20 15:50:53 -0400
commit85c2c6bba46900af6012b54c31e650095194b1aa (patch)
tree4519d86d44f5c40376a820f530b69fa2ee745de3 /tests/test_cmd2.py
parenta0a46f9396a72f440f65e46d7170a0d366796574 (diff)
downloadcmd2-git-85c2c6bba46900af6012b54c31e650095194b1aa.tar.gz
Changed cmd2 to use autocompleter by default for all argparse commands. Not all tests are passing yet.
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 35ef4c0f..48f50bdc 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -68,8 +68,12 @@ def test_base_argparse_help(base_app, capsys):
def test_base_invalid_option(base_app, capsys):
run_cmd(base_app, 'set -z')
out, err = capsys.readouterr()
- expected = ['usage: set [-h] [-a] [-l] [settable [settable ...]]', 'set: error: unrecognized arguments: -z']
- assert normalize(str(err)) == expected
+ out = normalize(out)
+ err = normalize(err)
+ assert len(err) == 3
+ assert len(out) == 15
+ assert 'Error: unrecognized arguments: -z' in err[0]
+ assert out[0] == 'usage: set [-h] [-a] [-l] [settable [settable ...]]'
def test_base_shortcuts(base_app):
out = run_cmd(base_app, 'shortcuts')