aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-08-02 13:57:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-08-05 11:37:12 +0200
commitffb2cb26f01c6315def0b84b90613adfd989d0e5 (patch)
treee0be4ff25087fd8ceacdbe66ffac646e1c46904a /sources/pyside6
parent963628350cd7ac6fb531fb4f91d50e750d8368cd (diff)
QtWidgets/private_mangle_test.py: Do not repeatedly instantiate QApplication
Port the test class to use UsesQApplication which keeps one instance. Pick-to: 6.7 Task-number: PYSIDE-2810 Change-Id: Ice5fe122ba0f9b357f10582addf87890890de9d3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/tests/QtWidgets/private_mangle_test.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/sources/pyside6/tests/QtWidgets/private_mangle_test.py b/sources/pyside6/tests/QtWidgets/private_mangle_test.py
index c535a4bf9..a6b2574d2 100644
--- a/sources/pyside6/tests/QtWidgets/private_mangle_test.py
+++ b/sources/pyside6/tests/QtWidgets/private_mangle_test.py
@@ -17,8 +17,9 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide6.QtCore import Signal
-from PySide6.QtWidgets import QApplication, QWidget
-from PySide6 import QtWidgets
+from PySide6.QtWidgets import QApplication, QWidget # noqa F401
+
+from helper.usesqapplication import UsesQApplication
class Harness(QWidget):
@@ -59,13 +60,7 @@ class _Under(QWidget):
self.method___result = self.sender()
-class TestMangle(unittest.TestCase):
-
- def setUp(self):
- QApplication()
-
- def tearDown(self):
- qApp.shutdown()
+class TestMangle(UsesQApplication):
def testPrivateMangle(self):
harness = Harness()