aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/util/helper/usesqapplication.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/util/helper/usesqapplication.py')
-rw-r--r--sources/pyside6/tests/util/helper/usesqapplication.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/pyside6/tests/util/helper/usesqapplication.py b/sources/pyside6/tests/util/helper/usesqapplication.py
index abb2ca238..bfc1e3ce6 100644
--- a/sources/pyside6/tests/util/helper/usesqapplication.py
+++ b/sources/pyside6/tests/util/helper/usesqapplication.py
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2020 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the test suite of Qt for Python.
@@ -28,6 +28,7 @@
'''Helper classes and functions'''
+import gc
import unittest
from PySide6.QtWidgets import QApplication
@@ -48,4 +49,6 @@ class UsesQApplication(unittest.TestCase):
def tearDown(self):
'''Deletes the reference owned by self'''
del self.app
+ # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion
+ gc.collect()
super(UsesQApplication, self).tearDown()