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

Function _check_roi_widgets

pyxrf/gui_module/tests/test_wd_load_data.py:24–30  ·  view source on GitHub ↗
(expected_values)

Source from the content-addressed store, hash-verified

22 assert f"{n_rows} rows, {n_columns} columns" in dlg.label_map_size.text(), "Map size was not set correctly"
23
24 def _check_roi_widgets(expected_values):
25 l_edit_widgets = (dlg.le_roi_start_row, dlg.le_roi_start_col, dlg.le_roi_end_row, dlg.le_roi_end_col)
26 for n, v in enumerate(expected_values):
27 if n < 2: # First 2 entries (are incremented when displayed)
28 v += 1
29 s = f"{v}" if v > 0 else ""
30 assert l_edit_widgets[n].text() == s, "Line Edit text does not match the expected text"
31
32 # Check if the default values were set correctly when image size was set
33 # (try to activate/deactivate the ROI selection group box)

Callers 2

test_DialogLoadMask_1Function · 0.85
test_DialogLoadMask_2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected