def test_debug_on_line_ignore_file(): """ If the filename is in the ignored bucket, do a return. """ editor = mock.MagicMock() view = mock.MagicMock() dm = DebugMode(editor, view) dm.debugger = mock.MagicMock() dm.debug_on_line('bdb.py', 100) dm.debugger.do_return.assert_called_once_with()
def test_debug_on_line(): """ Ensure the view is updated to the expected tab and the correct line is selected therein. """ editor = mock.MagicMock() view = mock.MagicMock() dm = DebugMode(editor, view) mock_tab = mock.MagicMock() editor.get_tab.return_value = mock_tab dm.debug_on_line('foo.py', 100) view.current_tab.setSelection.assert_called_once_with(0, 0, 0, 0) mock_tab.setSelection(99, 0, 100, 0)