def test_tab_session_restore(self): editor = MultiFileEditor(QMainWindow()) prev_session_tabs = [ os.path.join(os.path.dirname(__file__), '__init__.py'), __file__] editor.restore_session_tabs(prev_session_tabs) self.assertEqual(2, editor.editors.editor_count)
def test_tab_session_restore_path_doesnt_exist(self): editor = MultiFileEditor(QMainWindow()) prev_session_tabs = ['FileDoesntExist'] editor.restore_session_tabs(prev_session_tabs) self.assertEqual(1, editor.editors.editor_count) # default empty tab should be open