def test_debug_on_exception(): """ Since an exception has been signalled, allow the script to run to the end of life so the error is correctly reported via stdout. """ editor = mock.MagicMock() view = mock.MagicMock() dm = DebugMode(editor, view) dm.debugger = mock.MagicMock() dm.debug_on_exception("Exception", "Exception information") dm.debugger.do_run.assert_called_once_with() assert view.current_tab.reset_debugger_highlight.call_count == 1
def test_debug_on_exception(): """ Should do nothing. """ editor = mock.MagicMock() view = mock.MagicMock() dm = DebugMode(editor, view) assert dm.debug_on_exception(None, None) is None