Files
csaxs_bec/tests/conftest.py
appel_c eae967a04e
Some checks failed
CI for csaxs_bec / test (push) Failing after 37s
CI for csaxs_bec / test (pull_request) Failing after 47s
test(conftest): Add monkey patch for SocketSignal Readback_Timeout
2026-02-12 13:51:00 +01:00

15 lines
469 B
Python

"""
Conftest runs for all tests in this directory and subdirectories. Thereby, we know for
certain that the SocketSignal.READBACK_TIMEOUT is set to 0 for all tests, which prevents
hanging tests when a readback is attempted on a non-connected socket.
"""
# conftest.py
import pytest
from ophyd_devices.utils.socket import SocketSignal
@pytest.fixture(autouse=True)
def patch_socket_timeout(monkeypatch):
monkeypatch.setattr(SocketSignal, "READBACK_TIMEOUT", 0.0)