MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / test_debug_not_settable

Function test_debug_not_settable

tests/test_cmd2.py:915–925  ·  view source on GitHub ↗
(base_app)

Source from the content-addressed store, hash-verified

913
914
915def test_debug_not_settable(base_app) -> None:
916 # Set debug to False and make it unsettable
917 base_app.debug = False
918 base_app.remove_settable("debug")
919
920 # Cause an exception by setting editor to None and running edit
921 base_app.editor = None
922 _out, err = run_cmd(base_app, "edit")
923
924 # Since debug is unsettable, the user will not be given the option to enable a full traceback
925 assert err == ["ValueError: Please use 'set editor' to specify your text editing program of", "choice."]
926
927
928def test_blank_exception(mocker, base_app):

Callers

nothing calls this directly

Calls 2

run_cmdFunction · 0.85
remove_settableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…