def test_switch_context_tab(self): """Checks tab switches.""" app = common.create_pitivi_mock() editorperspective = EditorPerspective(app) editorperspective.setup_ui() for expected_tab, b_element in [(2, GES.TitleClip()), (0, GES.SourceClip()), (1, GES.TransitionClip())]: editorperspective.switchContextTab(b_element) self.assertEqual(editorperspective.context_tabs.get_current_page(), expected_tab, b_element) # Make sure the tab does not change when using an invalid argument. editorperspective.switchContextTab("invalid") self.assertEqual(editorperspective.context_tabs.get_current_page(), expected_tab)
def test_switch_context_tab(self): """Checks tab switches.""" app = common.create_pitivi_mock() mainwindow = MainWindow(app) for expected_tab, b_element in [(2, GES.TitleClip()), (0, GES.SourceClip()), (1, GES.TransitionClip())]: mainwindow.switchContextTab(b_element) self.assertEqual(mainwindow.context_tabs.get_current_page(), expected_tab, b_element) # Make sure the tab does not change when using an invalid argument. mainwindow.switchContextTab("invalid") self.assertEqual(mainwindow.context_tabs.get_current_page(), expected_tab) mainwindow.destroy()