mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-07 17:08:40 +01:00
added patternstart to python (#1368)
* added patternstart to python * release notesg
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user