diff options
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(' ') |