mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-07 01:34:48 +02:00
tests: add 'conftest.py' with ophyd_devices import to ensure ophyd is always patched, first
This commit is contained in:
1
tests/conftest.py
Normal file
1
tests/conftest.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
import ophyd_devices # ensure we are patched
|
@ -3,13 +3,10 @@ import time
|
|||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from ophyd.status import DeviceStatus, StatusBase, StatusTimeoutError
|
||||||
import ophyd_devices # ensure we are patched
|
|
||||||
|
|
||||||
|
|
||||||
def test_ophyd_status_patch():
|
def test_ophyd_status_patch():
|
||||||
from ophyd.status import DeviceStatus, StatusBase, StatusTimeoutError
|
|
||||||
|
|
||||||
assert StatusBase._bec_patched
|
assert StatusBase._bec_patched
|
||||||
|
|
||||||
st = DeviceStatus(device="test")
|
st = DeviceStatus(device="test")
|
||||||
|
Reference in New Issue
Block a user