aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-14 09:53:12 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:10 -0300
commitadf3d712d5c41eec81a69429c12df2c1851b9020 (patch)
treef174d0efa30a456a6e4e58d833153304e868e41b /tests/QtGui
parent2dcb2a855ac2a1c84cab355c53edf69926fa3ec5 (diff)
Created unittest for bug #750.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_750.py24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index bd59fb9c8..5b4b02bce 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -50,6 +50,7 @@ PYSIDE_TEST(bug_728.py)
PYSIDE_TEST(bug_736.py)
PYSIDE_TEST(bug_740.py)
PYSIDE_TEST(bug_743.py)
+PYSIDE_TEST(bug_750.py)
PYSIDE_TEST(bug_793.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
diff --git a/tests/QtGui/bug_750.py b/tests/QtGui/bug_750.py
new file mode 100644
index 000000000..9b66df9ed
--- /dev/null
+++ b/tests/QtGui/bug_750.py
@@ -0,0 +1,24 @@
+import unittest
+
+from helper import UsesQApplication
+
+from PySide.QtGui import QPainter, QFont, QFontInfo, QWidget, qApp
+
+class MyWidget(QWidget):
+ def paintEvent(self, e):
+ p = QPainter(self)
+ self._info = p.fontInfo()
+ self._app.quit()
+
+
+class TestQPainter(UsesQApplication):
+ def testFontInfo(self):
+ w = MyWidget()
+ w._app = self.app
+ w._info = None
+ w.show()
+ self.app.exec_()
+ self.assert_(w._info)
+
+if __name__ == '__main__':
+ unittest.main()