mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-06-23 03:17:58 +02:00
fix: improved patching of Ophyd 1.9
This commit is contained in:
@ -3,12 +3,19 @@ import time
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
from ophyd.status import StatusBase, StatusTimeoutError
|
||||
|
||||
import ophyd_devices # ensure we are patched
|
||||
|
||||
|
||||
def test_ophyd_status_patch():
|
||||
from ophyd.status import DeviceStatus, StatusBase, StatusTimeoutError
|
||||
|
||||
assert StatusBase._bec_patched
|
||||
|
||||
st = DeviceStatus(device="test")
|
||||
assert st._bec_patched
|
||||
assert isinstance(st, StatusBase)
|
||||
|
||||
cb = Mock()
|
||||
|
||||
st = StatusBase(timeout=1)
|
||||
|
Reference in New Issue
Block a user