diff options
Diffstat (limited to 'tests/signals/signal_emission_test.py')
-rw-r--r-- | tests/signals/signal_emission_test.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/signals/signal_emission_test.py b/tests/signals/signal_emission_test.py index 9c9f6139a..4fcdbe1e4 100644 --- a/tests/signals/signal_emission_test.py +++ b/tests/signals/signal_emission_test.py @@ -6,7 +6,6 @@ import sys import unittest from PySide.QtCore import QObject, SIGNAL, SLOT, QProcess, QTimeLine -from PySide.QtCore import QTimer, QThread from helper import BasicPySlotCase, UsesQCoreApplication @@ -68,23 +67,17 @@ class CppSignalsToCppSlots(UsesQCoreApplication): '''Connection between C++ slots and signals''' def testWithoutArgs(self): - '''Connect QThread.started() to QTimeLine.togglePaused()''' - thread = QThread() + '''Connect QProcess.started() to QTimeLine.togglePaused()''' + process = QProcess() timeline = QTimeLine() - QObject.connect(thread, SIGNAL('started()'), + QObject.connect(process, SIGNAL('finished(int, QProcess::ExitStatus)'), timeline, SLOT('toggleDirection()')) - QObject.connect(thread, SIGNAL('started()'), - self.exit_app_cb) orig_dir = timeline.direction() - timer = QTimer.singleShot(1000, self.exit_app_cb) # Just for safety - - thread.start() - self.app.exec_() - thread.exit(0) - thread.wait() + process.start(sys.executable, ['-c', '"print 42"']) + process.waitForFinished() new_dir = timeline.direction() |