From 5ab98bf2669b02c8be9176ca643816d34867a584 Mon Sep 17 00:00:00 2001 From: Mark Wolfman Date: Sun, 8 Sep 2024 12:40:10 -0500 Subject: [PATCH] Updated test to not require aioca. --- src/ophydregistry/tests/test_instrument_registry.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ophydregistry/tests/test_instrument_registry.py b/src/ophydregistry/tests/test_instrument_registry.py index 6293efe..9bc0ae6 100644 --- a/src/ophydregistry/tests/test_instrument_registry.py +++ b/src/ophydregistry/tests/test_instrument_registry.py @@ -6,7 +6,7 @@ import pytest from ophyd import Device, EpicsMotor, sim -from ophyd_async.epics.motor import Motor +from ophyd_async.core import Device as AsyncDevice, soft_signal_rw from ophydregistry import ComponentNotFound, MultipleComponentsFound, Registry @@ -146,9 +146,14 @@ def test_find_component(registry): def test_find_async_children(registry): """Check that the child components of an async device get registered.""" - motor = Motor(prefix="255idcVME:m1", name="m1") - registry.register(motor) - assert registry.find(motor.user_setpoint.name) is motor.user_setpoint + class MyDevice(AsyncDevice): + def __init__(self, name): + self.signal = soft_signal_rw() + super().__init__(name=name) + + device = MyDevice(name="m1") + registry.register(device) + assert registry.find(device.signal.name) is device.signal def test_find_name_by_dot_notation(registry):