aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-08-30 11:19:20 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:49 -0300
commit49ad2f9c1de0c8877f72a92ffab47d2895a48839 (patch)
treef0b2321dbc0a21c8b05a95db99cc326fa296e6fe /tests/QtGui
parent1c4ebcbe8a79c7b5c9a9db8164493926009831db (diff)
Created unit test for repr function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_991.py15
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 9c9339d4f..044366ded 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -72,6 +72,7 @@ PYSIDE_TEST(bug_921.py)
PYSIDE_TEST(bug_941.py)
PYSIDE_TEST(bug_964.py)
PYSIDE_TEST(bug_972.py)
+PYSIDE_TEST(bug_991.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(event_filter_test.py)
diff --git a/tests/QtGui/bug_991.py b/tests/QtGui/bug_991.py
new file mode 100644
index 000000000..55ff81d54
--- /dev/null
+++ b/tests/QtGui/bug_991.py
@@ -0,0 +1,15 @@
+import unittest
+from PySide.QtCore import QObject
+from PySide.QtGui import QPen, QBrush
+
+class TestBug991 (unittest.TestCase):
+ def testReprFunction(self):
+ reprPen = repr(QPen())
+ self.assertTrue(reprPen.startswith("<PySide.QtGui.QPen"))
+ reprBrush = repr(QBrush())
+ self.assertTrue(reprBrush.startswith("<PySide.QtGui.QBrush"))
+ reprObject = repr(QObject())
+ self.assertTrue(reprObject.startswith("<PySide.QtCore.QObject"))
+
+if __name__ == '__main__':
+ unittest.main()