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

Function test_RangeManager_7

pyxrf/gui_module/tests/test_useful_widgets.py:543–557  ·  view source on GitHub ↗

Check if the signal `selection_changed` is emitted correctly

(qtbot, full_range, selection, value_type)

Source from the content-addressed store, hash-verified

541])
542# fmt: on
543def test_RangeManager_7(qtbot, full_range, selection, value_type):
544 """Check if the signal `selection_changed` is emitted correctly"""
545
546 rman = RangeManager()
547 qtbot.addWidget(rman)
548 rman.show()
549
550 rman.set_range(full_range[0], full_range[1])
551 rman.set_selection(value_low=selection[0], value_high=selection[1])
552
553 def _check_signal_params(low, high, name):
554 return low == low and high == high
555
556 with qtbot.waitSignal(rman.selection_changed, check_params_cb=_check_signal_params):
557 rman.emit_selection_changed()
558
559
560# fmt: off

Callers

nothing calls this directly

Calls 5

set_rangeMethod · 0.95
set_selectionMethod · 0.95
RangeManagerClass · 0.90
showMethod · 0.80

Tested by

no test coverage detected