1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-04-28 19:12:31 +02:00

fix: Set OPHYD_CONTROL_LAYER to dummy for tests

This commit is contained in:
2026-04-04 12:53:33 +02:00
committed by Klaus Wakonig
parent 9a2396ee9c
commit 5e84d3bec6
+6 -1
View File
@@ -1,3 +1,8 @@
# Force ophyd onto its dummy control layer in tests so importing it does not
# try to create a real EPICS CA context.
import os
os.environ.setdefault("OPHYD_CONTROL_LAYER", "dummy")
import json
import time
from unittest import mock
@@ -13,7 +18,7 @@ from bec_lib.client import BECClient
from bec_lib.messages import _StoredDataInfo
from bec_qthemes import apply_theme
from bec_qthemes._theme import Theme
from ophyd._pyepics_shim import _dispatcher
from ophyd._dummy_shim import _dispatcher
from pytestqt.exceptions import TimeoutError as QtBotTimeoutError
from qtpy.QtCore import QEvent, QEventLoop
from qtpy.QtWidgets import QApplication, QMessageBox