aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-05-28 15:45:04 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-05-28 15:58:43 -0300
commit12e6ba386a733bd38105aacfa2d0304ac94ade67 (patch)
tree2b34af8534c7b21ce052a52836413616edc794f2 /tests
parente5c3d58025ef270db204420d0d72857b9f8230e4 (diff)
Test a specific situation that causes python segfault.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtgui/qwidget_test.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/qtgui/qwidget_test.py b/tests/qtgui/qwidget_test.py
index 288db372..a14311c1 100644
--- a/tests/qtgui/qwidget_test.py
+++ b/tests/qtgui/qwidget_test.py
@@ -1,9 +1,21 @@
import unittest
-from PySide.QtGui import QWidget
+from PySide.QtGui import QWidget, QMainWindow
from helper import UsesQApplication
+class QWidgetInherit(QMainWindow):
+ def __init__(self):
+ QWidget.__init__(self)
+
+class QWidgetTest(UsesQApplication):
+
+ def testInheritance(self):
+ newobj = QWidgetInherit()
+ widget = QWidget()
+ newobj.setCentralWidget(widget)
+ self.assertEqual(widget, newobj.centralWidget())
+
class QWidgetVisible(UsesQApplication):
def testBasic(self):