diff options
Diffstat (limited to 'sources/pyside6/tests/QtCore/qthread_signal_test.py')
-rw-r--r-- | sources/pyside6/tests/QtCore/qthread_signal_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtCore/qthread_signal_test.py b/sources/pyside6/tests/QtCore/qthread_signal_test.py index c50ec0101..d105e93f3 100644 --- a/sources/pyside6/tests/QtCore/qthread_signal_test.py +++ b/sources/pyside6/tests/QtCore/qthread_signal_test.py @@ -41,6 +41,7 @@ from PySide6.QtCore import QThread, QObject, SIGNAL, QCoreApplication thread_run = False + class Source(QObject): def __init__(self, *args): QObject.__init__(self, *args) @@ -48,6 +49,7 @@ class Source(QObject): def emit_sig(self): self.emit(SIGNAL('source()')) + class Target(QObject): def __init__(self, *args): QObject.__init__(self, *args) @@ -56,6 +58,7 @@ class Target(QObject): def myslot(self): self.called = True + class ThreadJustConnects(QThread): def __init__(self, source, *args): QThread.__init__(self, *args) @@ -71,7 +74,6 @@ class ThreadJustConnects(QThread): pass - class BasicConnection(unittest.TestCase): def testEmitOutsideThread(self): @@ -94,5 +96,6 @@ class BasicConnection(unittest.TestCase): self.assertTrue(thread.target.called) + if __name__ == '__main__': unittest.main() |