aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/thread_signals_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/thread_signals_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/thread_signals_test.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sources/pyside6/tests/QtCore/thread_signals_test.py b/sources/pyside6/tests/QtCore/thread_signals_test.py
index 21e4d7043..0aaa251bb 100644
--- a/sources/pyside6/tests/QtCore/thread_signals_test.py
+++ b/sources/pyside6/tests/QtCore/thread_signals_test.py
@@ -40,14 +40,17 @@ init_test_paths(False)
from PySide6.QtCore import QObject, SIGNAL, QFile, QThread, QTimer, Qt
from helper.usesqcoreapplication import UsesQCoreApplication
+
class MyThread(QThread):
def run(self):
- self.emit(SIGNAL("test(const QString&)"), "INdT - PySide");
+ self.emit(SIGNAL("test(const QString&)"), "INdT - PySide")
+
class TestThreadSignal(UsesQCoreApplication):
__called__ = True
+
def _callback(self, msg):
self.assertEqual(msg, "INdT - PySide")
self.__called__ = True
@@ -55,12 +58,13 @@ class TestThreadSignal(UsesQCoreApplication):
def testThread(self):
t = MyThread()
- QObject.connect(t, SIGNAL("test(const QString&)"), self._callback);
+ QObject.connect(t, SIGNAL("test(const QString&)"), self._callback)
t.start()
self.app.exec_()
t.wait()
- self.assertTrue(self.__called__);
+ self.assertTrue(self.__called__)
+
if __name__ == '__main__':
unittest.main()