feat: add dual patch pvs to ophyd_devices
This commit is contained in:
parent
8aa4587fb2
commit
c47918d6e7
@ -1,6 +1,17 @@
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
|
||||||
|
def patch_dual_pvs(device):
|
||||||
|
device.wait_for_connection(all_signals=True)
|
||||||
|
for walk in device.walk_signals():
|
||||||
|
if not hasattr(walk.item, "_read_pv"):
|
||||||
|
continue
|
||||||
|
if not hasattr(walk.item, "_write_pv"):
|
||||||
|
continue
|
||||||
|
if walk.item._read_pv.pvname.endswith("_RBV"):
|
||||||
|
walk.item._read_pv = walk.item._write_pv
|
||||||
|
|
||||||
|
|
||||||
class SocketMock:
|
class SocketMock:
|
||||||
"""Socket Mock. Used for testing"""
|
"""Socket Mock. Used for testing"""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user