aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/signals/signal_connectiontype_support_test.py')
-rw-r--r--sources/pyside6/tests/signals/signal_connectiontype_support_test.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/sources/pyside6/tests/signals/signal_connectiontype_support_test.py b/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
index 95ce1fa4f..0a69c1e02 100644
--- a/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
+++ b/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
@@ -10,13 +10,16 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from PySide6.QtCore import QObject, SIGNAL, Qt
+from PySide6.QtCore import QObject, Signal, Qt
-class Dummy(QObject):
+class Sender(QObject):
"""Dummy class used in this test."""
+
+ foo = Signal()
+
def __init__(self, parent=None):
- QObject.__init__(self, parent)
+ super().__init__(parent)
class TestConnectionTypeSupport(unittest.TestCase):
@@ -26,11 +29,11 @@ class TestConnectionTypeSupport(unittest.TestCase):
def testNoArgs(self):
"""Connect signal using a Qt.ConnectionType as argument"""
- obj1 = Dummy()
+ obj1 = Sender()
- QObject.connect(obj1, SIGNAL('foo()'), self.callback, Qt.DirectConnection)
+ obj1.foo.connect(self.callback, Qt.DirectConnection)
self.args = tuple()
- obj1.emit(SIGNAL('foo()'), *self.args)
+ obj1.foo.emit(*self.args)
self.assertTrue(self.called)