From c0d6e44accb302ab31694a4efa0c18c13fc997dd Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Thu, 2 Jun 2011 13:54:33 -0300 Subject: Updated example to handle with Python warnings. Reviewer: Marcelo Lira Luciano Wolf --- tests/QtGui/wrong_return_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/QtGui/wrong_return_test.py b/tests/QtGui/wrong_return_test.py index d14ac9e98..1807e4a23 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() -- cgit v1.2.3