refactor(nidaq): replace placeholder signals with DynamicSignal statistic groups
CI for debye_bec / test (push) Successful in 1m5s
CI for debye_bec / test (push) Successful in 1m5s
This commit is contained in:
@@ -182,3 +182,29 @@ def test_on_complete(mock_nidaq, scan_info_mock):
|
||||
dev.stop()
|
||||
status.wait(timeout=5)
|
||||
assert status.done is True
|
||||
|
||||
|
||||
########## DynamicSignal statistic groups ##########
|
||||
|
||||
from ophyd import Kind
|
||||
from ophyd_devices.utils.bec_signals import DynamicSignal
|
||||
|
||||
|
||||
def test_statistic_groups_and_omitted_epics(mock_nidaq):
|
||||
"""Groups own the unified namespace; EPICS scalars are silent data sources.
|
||||
|
||||
DynamicSignal is deliberate (per the NIDAQ maintainers, the active channel
|
||||
set cannot be predicted upfront): channel names are validated, batch
|
||||
completeness is not.
|
||||
"""
|
||||
dev = mock_nidaq
|
||||
assert isinstance(dev.mean, DynamicSignal)
|
||||
assert dev.mean.strict_signal_validation is False
|
||||
assert dev.mean.name == "nidaq_mean"
|
||||
assert dev.max.name == "nidaq_max"
|
||||
assert dev.std_dev.name == "nidaq_std_dev"
|
||||
assert dev.stream.name == "nidaq_stream"
|
||||
# EPICS scalars demoted: no longer in the readout namespace
|
||||
assert dev.ai0.kind == Kind.omitted
|
||||
assert dev.enc_epics.kind == Kind.omitted
|
||||
assert "nidaq_ai0" not in dev.read()
|
||||
|
||||
Reference in New Issue
Block a user