diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2009-12-28 17:35:03 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2010-01-04 20:01:56 -0300 |
commit | b38d83f8bdd7e50cf29ceb43b671807a30d826aa (patch) | |
tree | 21c19bb02d76948704f0bcfe8ed7dd17a0213979 /tests/signals | |
parent | 33c837a48d5183bf7a6b1b4061fbb7a15d33114a (diff) |
Remove usage of QThread in signal emission test
Reviewed by Anderson Lizardo (anderson.lizardo@openbossa.org)
Diffstat (limited to 'tests/signals')
-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() |