From ab918abc1e103e0ca86939f7d057e8a44ac8a4ef Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Mon, 7 Jun 2010 14:43:45 -0300 Subject: Created new unittest model. Separete unittest for module. Only run unittest for compiled modules. Reviewer: Marcelo Lira , Luciano Wolf --- tests/QtGui/qbrush_test.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/QtGui/qbrush_test.py (limited to 'tests/QtGui/qbrush_test.py') 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() -- cgit v1.2.3