From 8fd091ab444c1e4eae8a198130adad726657d81f Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Thu, 28 Aug 2025 12:47:14 +0200 Subject: [PATCH] test: apply theme on qapp creation --- tests/unit_tests/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit_tests/conftest.py b/tests/unit_tests/conftest.py index aec6e686..194bfed7 100644 --- a/tests/unit_tests/conftest.py +++ b/tests/unit_tests/conftest.py @@ -5,6 +5,7 @@ import h5py import numpy as np import pytest from bec_lib import messages +from bec_qthemes import apply_theme from pytestqt.exceptions import TimeoutError as QtBotTimeoutError from qtpy.QtWidgets import QApplication @@ -24,6 +25,11 @@ def pytest_runtest_makereport(item, call): @pytest.fixture(autouse=True) def qapplication(qtbot, request, testable_qtimer_class): # pylint: disable=unused-argument + qapp = QApplication.instance() + if not hasattr(qapp, "theme"): + apply_theme("light") + qapp.processEvents() + yield # if the test failed, we don't want to check for open widgets as