aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests')
-rw-r--r--sources/pyside6/tests/QtCore/signal_sender.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sources/pyside6/tests/QtCore/signal_sender.py b/sources/pyside6/tests/QtCore/signal_sender.py
index 464c50e3d..bcefe835e 100644
--- a/sources/pyside6/tests/QtCore/signal_sender.py
+++ b/sources/pyside6/tests/QtCore/signal_sender.py
@@ -2,18 +2,19 @@
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
from __future__ import annotations
+import gc
import os
import sys
import unittest
from pathlib import Path
sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
-from init_paths import init_test_paths
+from init_paths import init_test_paths # noqa: E402
init_test_paths(False)
-from helper.usesqapplication import UsesQApplication
+from helper.usesqapplication import UsesQApplication # noqa: E402
-from PySide6.QtCore import (QCoreApplication, QObject, QStringListModel,
+from PySide6.QtCore import (QCoreApplication, QObject, QStringListModel, # noqa: E402
QTimer, Signal, Slot, Qt)
@@ -83,6 +84,9 @@ class TestConstructorConnection(UsesQApplication):
dataChanged=changed_handler)
model.setData(model.index(0, 0), "bla", Qt.EditRole)
del model
+ # PYSIDE-535: Need to collect garbage twice in PyPy to trigger deletion
+ gc.collect()
+ gc.collect()
self.assertTrue(was_changed)
self.assertTrue(was_destroyed)