Skip to content

Commit

Permalink
Updated test to not require aioca.
Browse files Browse the repository at this point in the history
  • Loading branch information
canismarko committed Sep 8, 2024
1 parent a099f01 commit 5ab98bf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ophydregistry/tests/test_instrument_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 5ab98bf

Please sign in to comment.