From 29f6a260e49a6955dd12d354400d9ee6cfd6ddc7 Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Thu, 11 Feb 2010 16:04:06 -0300 Subject: Add UsesQCoreApplication in state machine test --- tests/qtcore/qstatemachine_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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() -- cgit v1.2.3