aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qbrush_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/qbrush_test.py')
-rw-r--r--tests/QtGui/qbrush_test.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtGui/qbrush_test.py b/tests/QtGui/qbrush_test.py
new file mode 100644
index 000000000..cf11652a5
--- /dev/null
+++ b/tests/QtGui/qbrush_test.py
@@ -0,0 +1,24 @@
+
+'''Test cases for QBrush'''
+
+import unittest
+
+from PySide.QtCore import Qt
+from PySide.QtGui import QApplication, QColor, QBrush
+
+from helper import UsesQApplication
+
+class Constructor(UsesQApplication):
+ '''Test case for constructor of QBrush'''
+
+ def testQColor(self):
+ #QBrush(QColor) constructor
+ color = QColor('black')
+ obj = QBrush(color)
+ self.assertEqual(obj.color(), color)
+
+ obj = QBrush(Qt.blue)
+ self.assertEqual(obj.color(), Qt.blue)
+
+if __name__ == '__main__':
+ unittest.main()