diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-11 16:04:06 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-11 16:04:06 -0300 |
commit | 29f6a260e49a6955dd12d354400d9ee6cfd6ddc7 (patch) | |
tree | d50842a675083e1d855fb8ae9bb125942eb7536a /tests/qtcore | |
parent | 8b35d247f8649c6b3f64d27ac6a43a8c54e640fd (diff) |
Add UsesQCoreApplication in state machine test
Diffstat (limited to 'tests/qtcore')
-rw-r--r-- | tests/qtcore/qstatemachine_test.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/qtcore/qstatemachine_test.py b/tests/qtcore/qstatemachine_test.py index dd3c16dff..67e6ac0b6 100644 --- a/tests/qtcore/qstatemachine_test.py +++ b/tests/qtcore/qstatemachine_test.py @@ -2,14 +2,14 @@ import unittest from PySide.QtCore import QObject, QState, QFinalState, SIGNAL, QCoreApplication, QTimer, QStateMachine, QSignalTransition, QVariant, QParallelAnimationGroup, QPropertyAnimation -class QStateMachineTest(unittest.TestCase): +from helper import UsesQCoreApplication + +class QStateMachineTest(UsesQCoreApplication): def cb(self, *args): self.assertEqual(self.machine.defaultAnimations(), [self.anim]) def testBasic(self): - app = QCoreApplication([]) - self.machine = QStateMachine() s1 = QState() s2 = QState() @@ -26,8 +26,8 @@ class QStateMachineTest(unittest.TestCase): self.machine.addDefaultAnimation(self.anim) self.machine.start() - QTimer.singleShot(100, app.quit) - app.exec_() + QTimer.singleShot(100, self.app.quit) + self.app.exec_() if __name__ == '__main__': unittest.main() |