diff options
author | Eric Lin <anselor@gmail.com> | 2018-04-20 15:50:53 -0400 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2018-04-20 15:50:53 -0400 |
commit | 85c2c6bba46900af6012b54c31e650095194b1aa (patch) | |
tree | 4519d86d44f5c40376a820f530b69fa2ee745de3 /tests/test_cmd2.py | |
parent | a0a46f9396a72f440f65e46d7170a0d366796574 (diff) | |
download | cmd2-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.py | 8 |
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') |