1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-12-31 03:01:18 +01:00

test: apply theme on qapp creation

This commit is contained in:
2025-08-28 12:47:14 +02:00
committed by wyzula-jan
parent 84b892d7f0
commit 8fd091ab44

View File

@@ -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