diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-07-08 14:05:26 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-07-08 14:05:26 -0400 |
commit | a425e19c6a93dc7e6b0a5f13f335de9f6a5e348e (patch) | |
tree | 45a5f052b45286d2e14b7074843c4e9124f49b6c /tests/test_parsing.py | |
parent | a140ad1cdb531d2bc60237502cf8601f46d60692 (diff) | |
download | cmd2-git-a425e19c6a93dc7e6b0a5f13f335de9f6a5e348e.tar.gz |
Added a few more unit tests
Diffstat (limited to 'tests/test_parsing.py')
-rw-r--r-- | tests/test_parsing.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 254aef15..bcb19f10 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -329,3 +329,12 @@ def test_option_parser_exit_with_msg(option_parser, capsys): out, err = capsys.readouterr() assert out == msg + '\n' assert err == '' + + +def test_empty_statement_raises_exception(): + app = cmd2.Cmd() + with pytest.raises(cmd2.EmptyStatement): + app._complete_statement('') + + with pytest.raises(cmd2.EmptyStatement): + app._complete_statement(' ') |