diff --git a/fury/ui/tests/test_containers.py b/fury/ui/tests/test_containers.py index a8cebf6c6..03b2b478a 100644 --- a/fury/ui/tests/test_containers.py +++ b/fury/ui/tests/test_containers.py @@ -255,56 +255,57 @@ def test_ui_tab_ui_top(interactive=False): expected_events_counts_filename = pjoin(DATA_DIR, filename + '.json') tab_ui = ui.TabUI( - position=(50, 50), size=(300, 300), nb_tabs=3, draggable=True, tabBar_pos="top") + position=(50, 50), size=(300, 300), nb_tabs=3, draggable=True, + tabBar_pos="top") tab_ui.tabs[0].title = 'Tab 1' tab_ui.tabs[1].title = 'Tab 2' tab_ui.tabs[2].title = 'Tab 3' - + npt.assert_equal(tab_ui.tabs[0].title_bold, False) npt.assert_equal(tab_ui.tabs[1].title_bold, False) npt.assert_equal(tab_ui.tabs[2].title_bold, False) - + tab_ui.tabs[0].title_bold = True tab_ui.tabs[1].title_bold = False tab_ui.tabs[2].title_bold = True - + npt.assert_equal(tab_ui.tabs[0].title_bold, True) npt.assert_equal(tab_ui.tabs[1].title_bold, False) npt.assert_equal(tab_ui.tabs[2].title_bold, True) - + npt.assert_equal(tab_ui.tabs[0].title_color, (.0, .0, .0)) npt.assert_equal(tab_ui.tabs[1].title_color, (.0, .0, .0)) npt.assert_equal(tab_ui.tabs[2].title_color, (.0, .0, .0)) - + tab_ui.tabs[0].title_color = (1, 0, 0) tab_ui.tabs[1].title_color = (0, 1, 0) tab_ui.tabs[2].title_color = (0, 0, 1) - + npt.assert_equal(tab_ui.tabs[0].title_color, (1., .0, .0)) npt.assert_equal(tab_ui.tabs[1].title_color, (.0, 1., .0)) npt.assert_equal(tab_ui.tabs[2].title_color, (.0, .0, 1.)) - + npt.assert_equal(tab_ui.tabs[0].title_font_size, 18) npt.assert_equal(tab_ui.tabs[1].title_font_size, 18) npt.assert_equal(tab_ui.tabs[2].title_font_size, 18) - + tab_ui.tabs[0].title_font_size = 10 tab_ui.tabs[1].title_font_size = 20 tab_ui.tabs[2].title_font_size = 30 - + npt.assert_equal(tab_ui.tabs[0].title_font_size, 10) npt.assert_equal(tab_ui.tabs[1].title_font_size, 20) npt.assert_equal(tab_ui.tabs[2].title_font_size, 30) - + npt.assert_equal(tab_ui.tabs[0].title_italic, False) npt.assert_equal(tab_ui.tabs[1].title_italic, False) npt.assert_equal(tab_ui.tabs[2].title_italic, False) - + tab_ui.tabs[0].title_italic = False tab_ui.tabs[1].title_italic = True tab_ui.tabs[2].title_italic = False - + npt.assert_equal(tab_ui.tabs[0].title_italic, False) npt.assert_equal(tab_ui.tabs[1].title_italic, True) npt.assert_equal(tab_ui.tabs[2].title_italic, False) @@ -361,62 +362,64 @@ def tab_change(tab_ui): npt.assert_equal(11, next(changes)) npt.assert_equal(5, next(collapses)) + def test_ui_tab_ui_bottom(interactive=False): filename = 'test_ui_tab_ui_bottom' recording_filename = pjoin(DATA_DIR, filename + '.log.gz') expected_events_counts_filename = pjoin(DATA_DIR, filename + '.json') tab_ui = ui.TabUI( - position=(50, 50), size=(300, 300), nb_tabs=3, draggable=True, tabBar_pos="bottom") + position=(50, 50), size=(300, 300), nb_tabs=3, draggable=True, + tabBar_pos="bottom") tab_ui.tabs[0].title = 'Tab 1' tab_ui.tabs[1].title = 'Tab 2' tab_ui.tabs[2].title = 'Tab 3' - + npt.assert_equal(tab_ui.tabs[0].title_bold, False) npt.assert_equal(tab_ui.tabs[1].title_bold, False) npt.assert_equal(tab_ui.tabs[2].title_bold, False) - + tab_ui.tabs[0].title_bold = True tab_ui.tabs[1].title_bold = False tab_ui.tabs[2].title_bold = True - + npt.assert_equal(tab_ui.tabs[0].title_bold, True) npt.assert_equal(tab_ui.tabs[1].title_bold, False) npt.assert_equal(tab_ui.tabs[2].title_bold, True) - + npt.assert_equal(tab_ui.tabs[0].title_color, (.0, .0, .0)) npt.assert_equal(tab_ui.tabs[1].title_color, (.0, .0, .0)) npt.assert_equal(tab_ui.tabs[2].title_color, (.0, .0, .0)) - + tab_ui.tabs[0].title_color = (1, 0, 0) tab_ui.tabs[1].title_color = (0, 1, 0) tab_ui.tabs[2].title_color = (0, 0, 1) - + npt.assert_equal(tab_ui.tabs[0].title_color, (1., .0, .0)) npt.assert_equal(tab_ui.tabs[1].title_color, (.0, 1., .0)) npt.assert_equal(tab_ui.tabs[2].title_color, (.0, .0, 1.)) - + npt.assert_equal(tab_ui.tabs[0].title_font_size, 18) npt.assert_equal(tab_ui.tabs[1].title_font_size, 18) npt.assert_equal(tab_ui.tabs[2].title_font_size, 18) - + tab_ui.tabs[0].title_font_size = 10 tab_ui.tabs[1].title_font_size = 20 tab_ui.tabs[2].title_font_size = 30 - + npt.assert_equal(tab_ui.tabs[0].title_font_size, 10) npt.assert_equal(tab_ui.tabs[1].title_font_size, 20) npt.assert_equal(tab_ui.tabs[2].title_font_size, 30) - + npt.assert_equal(tab_ui.tabs[0].title_italic, False) npt.assert_equal(tab_ui.tabs[1].title_italic, False) npt.assert_equal(tab_ui.tabs[2].title_italic, False) - + tab_ui.tabs[0].title_italic = False tab_ui.tabs[1].title_italic = True tab_ui.tabs[2].title_italic = False - + npt.assert_equal(tab_ui.tabs[0].title_italic, False) npt.assert_equal(tab_ui.tabs[1].title_italic, True) npt.assert_equal(tab_ui.tabs[2].title_italic, False) @@ -471,4 +474,4 @@ def tab_change(tab_ui): npt.assert_equal(0, tab_ui.active_tab_idx) npt.assert_equal(11, next(changes)) - npt.assert_equal(4, next(collapses)) \ No newline at end of file + npt.assert_equal(4, next(collapses))