added patternstart to python (#1368)
All checks were successful
Build on local RHEL9 / build (push) Successful in 1m27s
Build on local RHEL8 / build (push) Successful in 3m33s
Build on RHEL9 / build (push) Successful in 3m38s
Build on RHEL8 / build (push) Successful in 5m25s

* added patternstart to python

* release notesg
This commit is contained in:
2026-01-22 14:55:03 +01:00
committed by GitHub
parent b70d3c5ad3
commit e519633e16
3 changed files with 25 additions and 1 deletions

View File

@@ -3785,6 +3785,10 @@ class Detector(CppDetectorApi):
"""
return self.getPatterFileName()
def patternstart(self):
"""[Ctb][Mythen3][Xilinx Ctb] Starts pattern. """
self.startPattern()
@property
@element
def patioctrl(self):

View File

@@ -27,7 +27,7 @@ from slsdet import Detector, detectorType
@pytest.fixture(
scope="session",
params=['ctb', 'xilinx_ctb', 'mythen3']
params=['ctb', 'xilinx_ctb', 'mythen3', 'jungfrau']
)
def simulator(request):
"""Fixture to start the detector server once and clean up at the end."""
@@ -382,4 +382,22 @@ def test_definelist_bit(simulator, request):
d.define_bit(name="test_bit", addr=0x300, bit_position=1)
assert "Bit Definitions only for CTB" in str(exc_info.value)
Log(LogLevel.INFOGREEN, f"{request.node.name} passed")
@pytest.mark.withdetectorsimulators
def test_patternstart(simulator, request):
""" Test using patternstart for ctb, xilinx_ctb and mythen3."""
det_name = simulator
# setup
d = Detector()
d.hostname = f"localhost:{SERVER_START_PORTNO}"
if det_name in ['ctb', 'xilinx_ctb', 'mythen3']:
d.patternstart()
else:
with pytest.raises(Exception) as exc_info:
d.patternstart()
assert "not implemented" in str(exc_info.value)
Log(LogLevel.INFOGREEN, f"{request.node.name} passed")