From a425e19c6a93dc7e6b0a5f13f335de9f6a5e348e Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sat, 8 Jul 2017 14:05:26 -0400 Subject: Added a few more unit tests --- tests/test_parsing.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_parsing.py') 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(' ') -- cgit v1.2.1