summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-06-02 13:54:33 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-06-02 16:18:05 -0300
commitbec5ca48fd72f17c7bb5b3e43eb78edada67123b (patch)
tree9983423fc35983d9b04ab4440dd1bedac6336a24
parent75154e2f2fe237d33438a4ce3730ced145c475e4 (diff)
downloadpyside-bec5ca48fd72f17c7bb5b3e43eb78edada67123b.tar.gz
pyside-bec5ca48fd72f17c7bb5b3e43eb78edada67123b.tar.xz
pyside-bec5ca48fd72f17c7bb5b3e43eb78edada67123b.zip
Updated example to handle with Python warnings.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--tests/QtGui/wrong_return_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/QtGui/wrong_return_test.py b/tests/QtGui/wrong_return_test.py
index d14ac9e..1807e4a 100644
--- a/tests/QtGui/wrong_return_test.py
+++ b/tests/QtGui/wrong_return_test.py
@@ -6,6 +6,10 @@ from PySide import QtCore, QtGui
from helper import UsesQApplication
+import warnings
+warnings.simplefilter('error')
+
+
class MyWidget(QtGui.QWidget):
def __init__(self, parent=None):
super(MyWidget, self).__init__(parent)
@@ -17,7 +21,7 @@ class testCase(UsesQApplication):
def testVirtualReturn(self):
w = MyWidget()
- self.assertRaises(TypeError, w.show)
+ self.assertRaises(RuntimeWarning, w.show)
if __name__ == '__main__':
unittest.main()