From b484dd6f7156f83f02e04752f0f88e139310b12c Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 24 Aug 2025 15:47:28 +0200 Subject: [PATCH] Test the fontMatcher style name reset --- tests/test_base/test_base_common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_base/test_base_common.py b/tests/test_base/test_base_common.py index 76a11bd7..a46f02d0 100644 --- a/tests/test_base/test_base_common.py +++ b/tests/test_base/test_base_common.py @@ -537,6 +537,11 @@ def testBaseCommon_fontMatcher(monkeypatch): nonsense = QFont("nonesense", 10) assert fontMatcher(nonsense) is nonsense + # Style is reset + nonsense.setStyleName("blabla") + assert nonsense.styleName() == "blabla" + assert fontMatcher(nonsense).styleName() == "" + # General font if len(QFontDatabase.families()) > 1: fontOne = QFont(QFontDatabase.families()[0])