aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBruno dos Santos de Araujo <bruno.araujo@openbossa.org>2010-02-18 11:36:11 -0400
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-19 18:13:11 -0300
commit9f47f2174215eb49f3060669db66c7145e2ee7e5 (patch)
tree8b8bc78f01b9d7eedf7d9cbf473dccd4f4aaed7a /tests
parentecb715ae00b1b2f36518fa666dd1a685dd5f88ee (diff)
Add unit test for QGraphicsItem.isBlockedByModalPanel()
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qtgui/qgraphicsitem_isblocked_test.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/qtgui/qgraphicsitem_isblocked_test.py b/tests/qtgui/qgraphicsitem_isblocked_test.py
new file mode 100755
index 000000000..304a2be75
--- /dev/null
+++ b/tests/qtgui/qgraphicsitem_isblocked_test.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import unittest
+
+from PySide import QtGui, QtCore
+from helper import UsesQApplication
+
+class Item(QtGui.QGraphicsItem):
+
+ def __init__(self):
+ QtGui.QGraphicsItem.__init__(self)
+
+ def boundingRect(self):
+ return QtCore.QRectF(0, 0, 100, 100)
+
+ def paint(self, painter, option, widget):
+ painter.setBrush(QtGui.QColor(255, 255, 255))
+ painter.drawRect(0, 0, 100, 100)
+
+
+class QGraphicsViewIsBlockedTest(UsesQApplication):
+
+ def testIsBlockedByModalPanel(self):
+ item = Item()
+ item.isBlockedByModalPanel()
+
+if __name__ == "__main__":
+ unittest.main()