aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py')
-rw-r--r--sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
index adf8b8045..19b9a583e 100644
--- a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
+++ b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
@@ -47,9 +47,11 @@ from PySide6.QtCore import QObject, Signal, Slot
class Mixin(object):
mixinSignal = Signal()
+
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
+
class MixinTwo(Mixin):
mixinTwoSignal = Signal()
@@ -61,6 +63,7 @@ class MixinTwo(Mixin):
def mixinTwoSlot(self):
self.mixinTwoSlotCalled = True
+
class MixinThree(object):
mixinThreeSignal = Signal()
@@ -72,6 +75,7 @@ class MixinThree(object):
def mixinThreeSlot(self):
self.mixinThreeSlotCalled = True
+
class Derived(Mixin, QObject):
derivedSignal = Signal(str)
@@ -85,6 +89,7 @@ class Derived(Mixin, QObject):
self.derivedSlotCalled = True
self.derivedSlotString = theString
+
class MultipleDerived(MixinTwo, MixinThree, Mixin, QObject):
derivedSignal = Signal(str)
@@ -121,6 +126,7 @@ class MixinTest(unittest.TestCase):
# Check derivedSignal emission after mixingSignal connection
self.outsideSlotCalled = False
+
@Slot()
def outsideSlot():
self.outsideSlotCalled = True
@@ -146,7 +152,6 @@ class MixinTest(unittest.TestCase):
signature = m.method(i).methodSignature()
self.assertEqual(methodIndices[signature], i)
-
def testMixinSignalSlotRegistrationWithMultipleInheritance(self):
obj = MultipleDerived()
m = obj.metaObject()
@@ -170,6 +175,7 @@ class MixinTest(unittest.TestCase):
# Check derivedSignal emission after mixinThreeSignal connection
self.outsideSlotCalled = False
+
@Slot()
def outsideSlot():
self.outsideSlotCalled = True