summaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-03-22 11:12:33 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-03-22 11:13:32 -0300
commit78ca4c07492e092c9b7de5c1a126465dfbf7ad8b (patch)
tree461bcd8833106607d3181dd619d60116a59f598f /tests/QtGui
parent02f9ca54171d317f9f9a056ee5a6ed8650f46f7a (diff)
downloadpyside-78ca4c07492e092c9b7de5c1a126465dfbf7ad8b.tar.gz
pyside-78ca4c07492e092c9b7de5c1a126465dfbf7ad8b.tar.xz
pyside-78ca4c07492e092c9b7de5c1a126465dfbf7ad8b.zip
Only raise 'RuntimeError' for function call to avoid problems with contructor order calls.
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/bug_696.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/QtGui/bug_696.py b/tests/QtGui/bug_696.py
index b165d04..ff62e7a 100644
--- a/tests/QtGui/bug_696.py
+++ b/tests/QtGui/bug_696.py
@@ -34,9 +34,17 @@ class MainWindow(QMainWindow):
def __init__(self, *args):
self._menu = QMenu(self.dontexist) # attribute called with invalid C++ object
+class MainWindow2(QMainWindow):
+ def __init__(self):
+ self.show()
+
class Bug696(UsesQApplication):
def testContructorInitialization(self):
- self.assertRaises(RuntimeError, MainWindow)
+ self.assertRaises(AttributeError, MainWindow)
+
+ def testContructorInitializationAndCPPFunction(self):
+ self.assertRaises(RuntimeError, MainWindow2)
+
if __name__ == '__main__':
unittest.main()