aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/signals/pysignal_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/signals/pysignal_test.py')
-rw-r--r--sources/pyside6/tests/signals/pysignal_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/pyside6/tests/signals/pysignal_test.py b/sources/pyside6/tests/signals/pysignal_test.py
index cd7e5f145..030707149 100644
--- a/sources/pyside6/tests/signals/pysignal_test.py
+++ b/sources/pyside6/tests/signals/pysignal_test.py
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2016 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.
@@ -26,6 +26,7 @@
##
#############################################################################
+import gc
import os
import sys
import unittest
@@ -123,6 +124,8 @@ class PythonSigSlot(unittest.TestCase):
del self.args
except:
pass
+ # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion
+ gc.collect()
def callback(self, *args):
if tuple(self.args) == args:
@@ -174,6 +177,8 @@ if hasQtGui:
super(SpinBoxPySignal, self).tearDown()
del self.obj
del self.spin
+ # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion
+ gc.collect()
def testValueChanged(self):
"""Emission of a python signal to QSpinBox setValue(int)"""
@@ -208,6 +213,8 @@ if hasQtGui:
super(WidgetPySignal, self).tearDown()
del self.obj
del self.widget
+ # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion
+ gc.collect()
def testShow(self):
"""Emission of a python signal to QWidget slot show()"""