def test_init(self, dummy_window, app, config, empty_initial): """Make instantiation works as expected.""" if empty_initial: config = {} result = PreferencesDialog(dummy_window, app, config) grids = result.get_content_area().get_children()[0].get_children() # This assumes 2 children per config entry (label and widget). grid_entry_counts = [len(g.get_children()) / 2 for g in grids] assert sum(grid_entry_counts) == 8
def test_init(self, dummy_window, app, config): """Make instantiation works as expected.""" result = PreferencesDialog(dummy_window, app, config) grid = result.get_content_area().get_children()[0] # This assumes 2 children per config entry (label and widget). assert len(grid.get_children()) / 2 == len(config.keys())
def test_init(self, dummy_window, app, config): """Make instantiation works as expected.""" result = PreferencesDialog(dummy_window, app, config) grid = result.get_content_area().get_children()[0] # This assumes 2 children per config entry (label and widget). assert len(grid.get_children()) / 2 == len(config.keys())