diff options
author | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-02-04 10:57:15 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-02-05 11:15:55 -0300 |
commit | 1f9fab648e31df7f8b8396dd9ace08383e29419f (patch) | |
tree | 7989aba40e20da56043fa314f2162cfd999c9aa1 /tests/qtcore/qanimationgroup_test.py | |
parent | af7a410d23bad9f6d08e0d298db417208ef06e2d (diff) |
Adding test for QAbstractTransition, QAnimationGroup and QStateMachine.
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/qtcore/qanimationgroup_test.py')
-rw-r--r-- | tests/qtcore/qanimationgroup_test.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/qtcore/qanimationgroup_test.py b/tests/qtcore/qanimationgroup_test.py new file mode 100644 index 000000000..05bd81e10 --- /dev/null +++ b/tests/qtcore/qanimationgroup_test.py @@ -0,0 +1,24 @@ +#!/usr/bin/python +import unittest +from PySide.QtCore import QObject, QState, QFinalState, SIGNAL, QCoreApplication, QTimer, QStateMachine, QSignalTransition, QVariant, QParallelAnimationGroup, QSequentialAnimationGroup, QAnimationGroup + +class QAnimationGroupTest(unittest.TestCase): + + def testBasic(self): + app = QCoreApplication([]) + + panim = QParallelAnimationGroup() + sanim = QSequentialAnimationGroup() + panim.addAnimation(sanim) + + self.assertEqual(sanim.parent(), panim) + + panim.clear() + + self.assertRaises(RuntimeError, lambda :sanim.parent()) + + QTimer.singleShot(100, app.quit) + app.exec_() + +if __name__ == '__main__': + unittest.main() |