aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/signals/signal_signature_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/signals/signal_signature_test.py')
-rw-r--r--sources/pyside6/tests/signals/signal_signature_test.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/sources/pyside6/tests/signals/signal_signature_test.py b/sources/pyside6/tests/signals/signal_signature_test.py
index 7477f6243..e8f08b2d9 100644
--- a/sources/pyside6/tests/signals/signal_signature_test.py
+++ b/sources/pyside6/tests/signals/signal_signature_test.py
@@ -13,13 +13,17 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide6.QtCore import QObject, Signal, SIGNAL, SLOT
-from helper.usesqcoreapplication import UsesQCoreApplication
+from helper.usesqapplication import UsesQApplication
called = False
name = "Old"
+class Sender(QObject):
+ dummySignal = Signal()
+
+
class Obj(QObject):
dummySignalArgs = Signal(str)
numberSignal = Signal(int)
@@ -50,7 +54,7 @@ def callback_empty():
pass
-class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
+class TestConnectNotifyWithNewStyleSignals(UsesQApplication):
'''Test case for signal signature received by QObject::connectNotify().'''
def testOldStyle(self):
@@ -78,9 +82,9 @@ class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
def testStaticSlot(self):
global called
- sender = Obj()
- sender.connect(sender, SIGNAL("dummySignal()"), Obj.static_method)
- sender.emit(SIGNAL("dummySignal()"))
+ sender = Sender()
+ sender.dummySignal.connect(Obj.static_method)
+ sender.dummySignal.emit()
self.assertTrue(called)
def testStaticSlotArgs(self):
@@ -99,4 +103,3 @@ class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
if __name__ == '__main__':
unittest.main()
-