From 6ec7cd56a32680a182849817843ef95145986add Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Mon, 25 Apr 2011 10:24:57 -0300 Subject: Fix unit test bug_750 and qpicture_test to avoid deadlock in some plataforms. Reviewer: Lauro Moura Marcelo Lira --- tests/QtGui/bug_750.py | 3 ++- tests/QtGui/qpicture_test.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/QtGui') diff --git a/tests/QtGui/bug_750.py b/tests/QtGui/bug_750.py index 9b66df9ed..902a6555d 100644 --- a/tests/QtGui/bug_750.py +++ b/tests/QtGui/bug_750.py @@ -2,6 +2,7 @@ import unittest from helper import UsesQApplication +from PySide.QtCore import QTimer from PySide.QtGui import QPainter, QFont, QFontInfo, QWidget, qApp class MyWidget(QWidget): @@ -16,7 +17,7 @@ class TestQPainter(UsesQApplication): w = MyWidget() w._app = self.app w._info = None - w.show() + QTimer.singleShot(300, w.show) self.app.exec_() self.assert_(w._info) diff --git a/tests/QtGui/qpicture_test.py b/tests/QtGui/qpicture_test.py index 2aa82c918..3cc248927 100644 --- a/tests/QtGui/qpicture_test.py +++ b/tests/QtGui/qpicture_test.py @@ -2,6 +2,7 @@ import unittest import os from helper import UsesQApplication +from PySide.QtCore import QTimer from PySide.QtGui import QPicture, QPainter, QWidget class MyWidget(QWidget): @@ -27,7 +28,8 @@ class QPictureTest(UsesQApplication): w = MyWidget() w._picture = picture2 w._app = self.app - w.show() + + QTimer.singleShot(300, w.show) self.app.exec_() if __name__ == '__main__': -- cgit v1.2.3