aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-23 12:14:04 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-23 14:08:39 -0300
commitabf841fbd3a28d16441ea076584d37b68659b288 (patch)
tree621792687a067963d4bf44882e98d02e54285b1f /tests
parentce1cadcacf01f4428f0f247dcd34ffdc38c9184e (diff)
Created unit test for bug #480.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_480.py25
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index e071ddfa6..2ad8269a9 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -17,6 +17,7 @@ PYSIDE_TEST(bug_429.py)
PYSIDE_TEST(bug_430.py)
PYSIDE_TEST(bug_433.py)
PYSIDE_TEST(bug_467.py)
+PYSIDE_TEST(bug_480.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
diff --git a/tests/QtGui/bug_480.py b/tests/QtGui/bug_480.py
new file mode 100644
index 000000000..bb28f3661
--- /dev/null
+++ b/tests/QtGui/bug_480.py
@@ -0,0 +1,25 @@
+import unittest
+
+from PySide import QtGui
+
+class BuggyWidget(QtGui.QWidget):
+ def setup(self):
+ self.verticalLayout = QtGui.QVBoxLayout(self)
+ self.gridLayout = QtGui.QGridLayout()
+ self.lbl = QtGui.QLabel(self)
+ self.gridLayout.addWidget(self.lbl, 0, 1, 1, 1)
+
+ # this cause a segfault during the ownership transfer
+ self.verticalLayout.addLayout(self.gridLayout)
+
+class LayoutTransferOwnerShip(unittest.TestCase):
+ def testBug(self):
+ app = QtGui.QApplication([])
+ w = BuggyWidget()
+ w.setup()
+ w.show()
+ self.assert_(True)
+
+if __name__ == '__main__':
+ unittest.main()
+