mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-06-06 09:58:41 +02:00
fix(bec-processed-signal): fix read on processed signal, will force a read on linked signal now
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
from bec_server.device_server.tests.utils import DMMock
|
||||
from ophyd import Component as Cpt
|
||||
@@ -121,6 +123,13 @@ def test_processed_signal_describe_metadata(processed_signal_from_device_manager
|
||||
assert "samy.readback" in info["method_inputs"]
|
||||
|
||||
|
||||
def test_processed_signal_forces_read(processed_signal_from_device_manager, samx):
|
||||
"""Test that get() forces read of all input signals."""
|
||||
with mock.patch.object(samx.readback, "read") as mock_read:
|
||||
processed_signal_from_device_manager.read()
|
||||
mock_read.assert_called_once()
|
||||
|
||||
|
||||
def test_processed_signal_model_rejects_missing_required_inputs():
|
||||
"""Test compute model validation when required kwargs are missing."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user