mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-10 07:32:05 +02:00
74166a1ea1
Build and Deploy on local RHEL9 / build (push) Successful in 2m10s
Build on RHEL9 docker image / build (push) Successful in 3m37s
Build on RHEL8 docker image / build (push) Successful in 4m50s
Build and Deploy on local RHEL8 / build (push) Successful in 5m7s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m16s
Run Simulator Tests on local RHEL8 / build (push) Successful in 21m52s
* fixed python simulator test fixture
* clear_roi after every test to bring it back to default state, test passing multiple parameters
* Exposing the ctb api tests now to CI
* Revert "Exposing the ctb api tests now to CI"
This reverts commit 411fad1b27.
* fixed tests removed uneccessary stuff
* did not save properly
* updated documentation, renamed file
---------
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
60 lines
1.4 KiB
Python
60 lines
1.4 KiB
Python
import pytest
|
|
import sys
|
|
|
|
from conftest import session_simulator
|
|
|
|
from slsdet import Detector
|
|
|
|
from slsdet._slsdet import slsDetectorDefs
|
|
|
|
detectorType = slsDetectorDefs.detectorType
|
|
|
|
@pytest.mark.detectorintegration
|
|
def test_rx_ROI(session_simulator):
|
|
""" Test rx_ROI property of Detector class. """
|
|
det_type, num_interfaces, num_mods, d = session_simulator
|
|
assert d is not None
|
|
|
|
if d.type == detectorType.CHIPTESTBOARD or d.type == detectorType.XILINX_CHIPTESTBOARD:
|
|
pytest.skip("Skipping ROI test for ctb/xilinx_ctb detector types.")
|
|
|
|
if(d.type == detectorType.MYTHEN3 or d.type == detectorType.GOTTHARD2):
|
|
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)]
|
|
d.rx_clearroi()
|
|
else:
|
|
|
|
d.rx_roi = (0, 10, 10, 20)
|
|
roi = d.rx_roi
|
|
assert roi == [(0, 10, 10, 20)]
|
|
|
|
d.rx_roi = [5,15,15,25]
|
|
|
|
assert d.rx_roi == [(5,15,15,25)]
|
|
|
|
if d.nmod > 1 and (d.type != detectorType.JUNGFRAU) or (d.numinterfaces == 2 and d.type != detectorType.EIGER):
|
|
d.rx_roi = [[0,10,0,20], [5,20,410,420]]
|
|
|
|
roi = d.rx_roi
|
|
assert roi == [(0,10,0,20), (5,20,410,420)] #in same file for jungfrau
|
|
|
|
d.rx_clearroi()
|
|
roi = d.rx_roi
|
|
assert roi == [(-1,-1,-1,-1)]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|