aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/qobject_destructor.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/qobject_destructor.py')
-rw-r--r--sources/pyside6/tests/QtCore/qobject_destructor.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/pyside6/tests/QtCore/qobject_destructor.py b/sources/pyside6/tests/QtCore/qobject_destructor.py
index 50f2ffc10..2354cdfa7 100644
--- a/sources/pyside6/tests/QtCore/qobject_destructor.py
+++ b/sources/pyside6/tests/QtCore/qobject_destructor.py
@@ -35,16 +35,17 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from PySide6 import QtCore
+from PySide6.QtCore import QObject
-class MyObject(QtCore.QObject):
+
+class MyObject(QObject):
def __init__(self, other=None):
- QtCore.QObject.__init__(self, None)
+ super().__init__(None)
self._o = other
class TestDestructor(unittest.TestCase):
def testReference(self):
- o = QtCore.QObject()
+ o = QObject()
m = MyObject(o)
self.assertEqual(sys.getrefcount(o), 3)
del m