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)
| 49 | sample_table_content]) # Full table |
| 50 | # fmt: on |
| 51 | def 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" |
nothing calls this directly
no test coverage detected