aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-02-11 16:13:11 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-12 14:07:17 -0300
commit50d8761aa8ec6e6bba62edabec084c25b2791bab (patch)
tree94577ce7f07d35bedd4592b8edbf9769d3a3c248 /tests
parentd39d8d6b5eba15e755451624b77a7601e94fc5d9 (diff)
Adding QSet conversions plus test in qstatemachine
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtcore/qstatemachine_test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/qtcore/qstatemachine_test.py b/tests/qtcore/qstatemachine_test.py
index 08cfdffce..ce2449d15 100644
--- a/tests/qtcore/qstatemachine_test.py
+++ b/tests/qtcore/qstatemachine_test.py
@@ -43,5 +43,26 @@ class QStateMachineTest(UsesQCoreApplication):
QTimer.singleShot(100, self.app.quit)
self.app.exec_()
+
+class QSetConverterTest(UsesQCoreApplication):
+ '''Test converter of QSet toPython using QStateAnimation.configuration'''
+
+ def testBasic(self):
+ '''QStateMachine.configuration converting QSet to python set'''
+ machine = QStateMachine()
+ s1 = QState()
+ machine.addState(s1)
+ machine.setInitialState(s1)
+ machine.start()
+
+ QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+ configuration = machine.configuration()
+
+ self.assert_(isinstance(configuration, set))
+ self.assert_(s1 in configuration)
+
+
if __name__ == '__main__':
unittest.main()