diff options
Diffstat (limited to 'tests/test_cmd2.py')
-rwxr-xr-x | tests/test_cmd2.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 0615ed46..fecab628 100755 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -630,7 +630,7 @@ now: True def test_debug_not_settable(base_app): # Set debug to False and make it unsettable base_app.debug = False - del base_app.settables['debug'] + base_app.remove_settable('debug') # Cause an exception out, err = run_cmd(base_app, 'bad "quote') @@ -638,6 +638,10 @@ def test_debug_not_settable(base_app): # Since debug is unsettable, the user will not be given the option to enable a full traceback assert err == ['Invalid syntax: No closing quotation'] +def test_remove_settable_keyerror(base_app): + with pytest.raises(KeyError): + base_app.remove_settable('fake') + def test_edit_file(base_app, request, monkeypatch): # Set a fake editor just to make sure we have one. We aren't really going to call it due to the mock base_app.editor = 'fooedit' |