aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-09-09 15:24:51 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-09-09 15:25:19 -0300
commitae435c55fc8bdc6b2c6456e0f4d00589d7b3bb2c (patch)
treede85281deea1ce38f1e768d45affd25ecba2fb3c /tests
parent64663cdb4ef1c64b362c1693a3243df0e3818c1a (diff)
Created unittest for bug #338.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_338.py24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 39b30424a..887caa62e 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -5,6 +5,7 @@ PYSIDE_TEST(bug_243.py)
PYSIDE_TEST(bug_300_test.py)
PYSIDE_TEST(bug_307.py)
PYSIDE_TEST(bug_324.py)
+PYSIDE_TEST(bug_338.py)
PYSIDE_TEST(add_action_test.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
diff --git a/tests/QtGui/bug_338.py b/tests/QtGui/bug_338.py
new file mode 100644
index 000000000..a419fdbe3
--- /dev/null
+++ b/tests/QtGui/bug_338.py
@@ -0,0 +1,24 @@
+''' Test bug 338: http://bugs.openbossa.org/show_bug.cgi?id=338'''
+
+import sys
+import unittest
+from PySide import QtCore,QtGui
+
+class DiagramItem(QtGui.QGraphicsPolygonItem):
+ def __init__(self, parent=None, scene=None):
+ super(DiagramItem, self).__init__(parent, scene)
+
+ def itemChange(self, change, value):
+ return value
+
+
+class BugTest(unittest.TestCase):
+ def test(self):
+ app = QtGui.QApplication(sys.argv)
+ scene = QtGui.QGraphicsScene()
+ item = DiagramItem()
+ item2 = DiagramItem()
+ #this cause segfault
+ scene.addItem(item)
+ scene.addItem(item2)
+