aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qtcore/qevent_test.py
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-21 14:51:26 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-21 14:52:09 -0300
commit9af36fbb64f19842c0cc797c0b586b3a686805e8 (patch)
tree6bbc050ded0f85517ea75f5dc6dc1ed172168248 /tests/qtcore/qevent_test.py
parentaa12538d63685ef8f75adaa79411b751929b727d (diff)
Added all original pyside unit tests to the shiboken version.
Diffstat (limited to 'tests/qtcore/qevent_test.py')
-rw-r--r--tests/qtcore/qevent_test.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/qtcore/qevent_test.py b/tests/qtcore/qevent_test.py
new file mode 100644
index 000000000..07f23f098
--- /dev/null
+++ b/tests/qtcore/qevent_test.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+'''Test cases for QtCore.QEvent'''
+
+import unittest
+
+from PySide.QtCore import QEvent
+
+class QEventTypeFlag(unittest.TestCase):
+ '''Test case for usage of QEvent.Type flags'''
+
+ def testFlagAccess(self):
+ #QEvent.Type flags usage
+
+ event = QEvent(QEvent.Timer)
+ self.assertEqual(event.type(), QEvent.Timer)
+
+ event = QEvent(QEvent.Close)
+ self.assertEqual(event.type(), QEvent.Close)
+
+ event = QEvent(QEvent.IconTextChange)
+ self.assertEqual(event.type(), QEvent.IconTextChange)
+
+if __name__ == '__main__':
+ unittest.main()