diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-03 13:44:51 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-09 13:20:13 +0200 |
| commit | 140b7df1263e2d24d1fc69b8ad305e8189d1dadc (patch) | |
| tree | 0f414ea7a55bd8407651ddb0441e0c05ed2e8f79 /sources/pyside6/tests/signals/signal_signature_test.py | |
| parent | f619b4c45b042c3a656a80b57cb4f154ef15bd1a (diff) | |
Port signals tests to modern syntax
Use the modern syntax where appropriate. Some tests are
left unmodified to at least test the syntax.
As a drive-by, remove the hasQtGui import checks since
widgets should be built when this is run.
Pick-to: 6.7
Task-number: PYSIDE-2646
Change-Id: I9acf07d0b735009f6aff4a55382dae745d855786
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/tests/signals/signal_signature_test.py')
| -rw-r--r-- | sources/pyside6/tests/signals/signal_signature_test.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sources/pyside6/tests/signals/signal_signature_test.py b/sources/pyside6/tests/signals/signal_signature_test.py index a7be1ff11..e8f08b2d9 100644 --- a/sources/pyside6/tests/signals/signal_signature_test.py +++ b/sources/pyside6/tests/signals/signal_signature_test.py @@ -20,6 +20,10 @@ called = False name = "Old" +class Sender(QObject): + dummySignal = Signal() + + class Obj(QObject): dummySignalArgs = Signal(str) numberSignal = Signal(int) @@ -78,9 +82,9 @@ class TestConnectNotifyWithNewStyleSignals(UsesQApplication): 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): |
