diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-16 17:48:32 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-16 17:48:32 -0400 |
commit | adcc870d6f86ac8e5b66323f845c0e92521bc46c (patch) | |
tree | eb6587a0674b18529772a124ec2fd15f664090e5 /tests/test_cmd2.py | |
parent | 6b388ede0d1cc77a587164010cd0c47aa6ec7052 (diff) | |
parent | 8e92f9dadb87e96852af8e5293ca26a4db0c64b0 (diff) | |
download | cmd2-git-adcc870d6f86ac8e5b66323f845c0e92521bc46c.tar.gz |
Merge branch 'master' into attributes
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index eadcc1f4..2137b564 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -952,10 +952,10 @@ undoc """) assert out == expected -def test_help_undocumented(help_app): - out = run_cmd(help_app, 'help undoc') - expected = normalize('*** No help on undoc') - assert out == expected +def test_help_undocumented(help_app, capsys): + run_cmd(help_app, 'help undoc') + out, err = capsys.readouterr() + assert err.startswith("No help on undoc") def test_help_overridden_method(help_app): out = run_cmd(help_app, 'help edit') @@ -1786,8 +1786,9 @@ def test_macro_create_with_escaped_args(base_app, capsys): assert out == normalize("Macro 'fake' created") # Run the macro - out = run_cmd(base_app, 'fake') - assert 'No help on {1}' in out[0] + run_cmd(base_app, 'fake') + out, err = capsys.readouterr() + assert err.startswith('No help on {1}') def test_macro_usage_with_missing_args(base_app, capsys): # Create the macro |