mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-20 19:41:18 +01:00
rx_roi also accepts sequence of 2 ints
This commit is contained in:
@@ -6,8 +6,19 @@ from conftest import test_with_simulators
|
||||
from slsdet import Detector
|
||||
|
||||
@pytest.mark.withdetectorsimulators
|
||||
@pytest.mark.parametrize("servers", [["eiger"]], indirect=True)
|
||||
def test_rx_ROI(test_with_simulators):
|
||||
""" Test setting and getting rx_ROI property of Detector class. """
|
||||
""" Test setting and getting rx_ROI property of Detector class for moench. """
|
||||
|
||||
d = Detector()
|
||||
d.rx_roi = (0, 10, 10, 20)
|
||||
roi = d.rx_roi
|
||||
assert roi == [(0, 10, 10, 20)]
|
||||
|
||||
@pytest.mark.withdetectorsimulators
|
||||
@pytest.mark.parametrize("servers", [["moench"]], indirect=True)
|
||||
def test_rx_ROI_moench(test_with_simulators, servers):
|
||||
""" Test setting and getting rx_ROI property of Detector class for moench. """
|
||||
|
||||
d = Detector()
|
||||
d.rx_roi = (0, 10, 10, 20)
|
||||
@@ -27,4 +38,21 @@ def test_rx_ROI(test_with_simulators):
|
||||
roi = d.rx_roi
|
||||
assert roi == [(-1,-1,-1,-1)]
|
||||
|
||||
@pytest.mark.withdetectorsimulators
|
||||
@pytest.mark.parametrize("servers", [["mythen3"]], indirect=True)
|
||||
def test_rx_ROI_mythen(test_with_simulators, servers):
|
||||
""" Test setting and getting rx_ROI property of Detector class for mythen. """
|
||||
|
||||
d = Detector()
|
||||
d.rx_roi = (0, 10)
|
||||
roi = d.rx_roi
|
||||
assert roi == [(0, 10, -1, -1)]
|
||||
|
||||
#d.rx_roi = [[5,15, 0, 1]] # not allowed for mythen3
|
||||
|
||||
d.rx_roi = [0,10, -1, -1]
|
||||
|
||||
assert d.rx_roi == [(0,10,-1,-1)]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user