diff options
Diffstat (limited to 'tests/test_cmd2.py')
-rwxr-xr-x | tests/test_cmd2.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 1ba10f6b..85246c96 100755 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -87,6 +87,10 @@ def test_base_shortcuts(base_app): expected = normalize(SHORTCUTS_TXT) assert out == expected +def test_command_starts_with_shortcut(): + with pytest.raises(ValueError) as excinfo: + app = cmd2.Cmd(shortcuts={'help': 'fake'}) + assert "Invalid command name 'help'" in str(excinfo.value) def test_base_show(base_app): # force editor to be 'vim' so test is repeatable across platforms |