From eae967a04e8544399aec31d20b62e32179ee1b41 Mon Sep 17 00:00:00 2001 From: appel_c Date: Thu, 12 Feb 2026 13:51:00 +0100 Subject: [PATCH] test(conftest): Add monkey patch for SocketSignal Readback_Timeout --- tests/conftest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..cfe52ea --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,14 @@ +""" +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) -- 2.49.1