added patternstart to python (#1368)

* added patternstart to python

* release notesg
This commit is contained in:
2026-08-02 23:01:36 +02:00
committed by mazzol_a
parent 73f3208512
commit 4490a0f83a
3 changed files with 34 additions and 0 deletions
+5
View File
@@ -271,7 +271,12 @@ Experimental support for building the detector client (including python bindings
Detector.pattern (python) accepts also a pattern object, not only a pattern file
<<<<<<< HEAD
>>>>>>> 06cd6c9eb (docstring and release)
=======
added patternstart to python (ctb, xilinx_ctb , mythen3), only the detector class api was exposed (startPattern())
>>>>>>> e519633e1 (added patternstart to python (#1368))
2 On-board Detector Server Compatibility
==========================================
+4
View File
@@ -3601,6 +3601,10 @@ class Detector(CppDetectorApi):
"""
return self.getPatterFileName()
def patternstart(self):
"""[Ctb][Mythen3][Xilinx Ctb] Starts pattern. """
self.startPattern()
@property
@element
def patioctrl(self):
+25
View File
@@ -13,6 +13,15 @@ from utils_for_test import (
from slsdet import Detector
@pytest.fixture(
scope="session",
params=['ctb', 'xilinx_ctb', 'mythen3', 'jungfrau']
)
def simulator(request):
"""Fixture to start the detector server once and clean up at the end."""
det_name = request.param
num_mods = 1
fp = sys.stdout
@pytest.mark.detectorintegration
def test_define_reg(session_simulator, request):
@@ -342,6 +351,7 @@ def test_definelist_bit(session_simulator, request):
Log(LogLevel.INFOGREEN, f"{request.node.name} passed")
<<<<<<< HEAD:python/tests/test_det_api.py
@pytest.mark.detectorintegration
def test_parameters_file(session_simulator, request):
""" Test using test_parameters_file."""
@@ -387,10 +397,25 @@ def test_patternstart(session_simulator, request):
assert d is not None
if det_type in ['ctb', 'xilinx_ctb', 'mythen3']:
=======
@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']:
>>>>>>> e519633e1 (added patternstart to python (#1368)):python/tests/test_CtbAPI.py
d.patternstart()
else:
with pytest.raises(Exception) as exc_info:
d.patternstart()
assert "not implemented" in str(exc_info.value)
<<<<<<< HEAD:python/tests/test_det_api.py
Log(LogLevel.INFOGREEN, f"{request.node.name} passed")
=======
Log(LogLevel.INFOGREEN, f"{request.node.name} passed")
>>>>>>> e519633e1 (added patternstart to python (#1368)):python/tests/test_CtbAPI.py