Files
tomcat_bec/tests/tests_devices/test_pcocam.py
gac-x05la ae85d179f5 refactor: std daq integration
Major refactor of the std daq integration for the PCO Edge camera and Gigafrost camera.
New live processing capabilities have been added, and the code has been cleaned up for better maintainability.
2025-06-16 16:59:08 +02:00

26 lines
670 B
Python

from unittest import mock
import pytest
from tomcat_bec.devices.pco_edge.pcoedgecamera import PcoEdge5M
@pytest.fixture()
def pcocam_base():
gfcam = PcoEdge5M(
"X02DA-CAM-GF2:",
name="pco_edge_camera",
std_daq_rest="http://example.com/rest",
std_daq_ws="ws://example.com/ws",
)
for component in gfcam.component_names:
type.__setattr__(PcoEdge5M, component, mock.MagicMock())
yield gfcam
def test_pcocam_init_raises_without_rest_ws():
with pytest.raises(ValueError) as excinfo:
PcoEdge5M("X02DA-CAM-GF2:", name="pco_edge_camera")
excinfo.match("std_daq_rest and std_daq_ws must be provided")