aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-25 10:24:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:14 -0300
commit6ec7cd56a32680a182849817843ef95145986add (patch)
tree37df39be0886ed69ef4b6b0bba66bb95366084ae
parent9b4a43be493cb38adc5aa3a4b195ab9033ce550e (diff)
Fix unit test bug_750 and qpicture_test to avoid deadlock in some plataforms.
Reviewer: Lauro Moura <lauro.neto@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--tests/QtGui/bug_750.py3
-rw-r--r--tests/QtGui/qpicture_test.py4
2 files changed, 5 insertions, 2 deletions
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__':