MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / test_WndImageWizard_1

Function test_WndImageWizard_1

pyxrf/gui_module/tests/test_wd_image_wizard.py:51–68  ·  view source on GitHub ↗

Fill the table and show the window. Test if the table data is set successfully and the table contains the expected number of rows.

(qtbot, sample_table_data)

Source from the content-addressed store, hash-verified

49 sample_table_content]) # Full table
50# fmt: on
51def test_WndImageWizard_1(qtbot, sample_table_data):
52 """
53 Fill the table and show the window.
54 Test if the table data is set successfully and the table contains
55 the expected number of rows.
56 """
57 gpc = _get_gpc_sim(sample_table_data)
58 gui_vars = global_gui_variables
59
60 wnd = WndImageWizard(gpc=gpc, gui_vars=gui_vars)
61 qtbot.addWidget(wnd)
62 wnd.show()
63
64 wnd.slot_update_table()
65 # Check that the table was saved correctly
66 assert wnd._range_data == sample_table_data, "Table data was set incorrectly"
67 # Check the number of table rows
68 assert wnd.table.rowCount() == len(sample_table_data), "Incorrect number of table rows"

Callers

nothing calls this directly

Calls 4

slot_update_tableMethod · 0.95
WndImageWizardClass · 0.90
_get_gpc_simFunction · 0.85
showMethod · 0.80

Tested by

no test coverage detected