diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-06-02 13:54:33 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:26 -0300 |
commit | c0d6e44accb302ab31694a4efa0c18c13fc997dd (patch) | |
tree | 6a0c8657bae30c29adc73304612e949af5ec6401 /tests | |
parent | f1c7c786943e66e45a632491192a8b4a40da45e3 (diff) |
Updated example to handle with Python warnings.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/wrong_return_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
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() |