summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_693.py
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-03-18 17:37:00 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-03-18 18:32:37 -0300
commit13d9f714c5a990ff22b2e1621e1706ed81a1846b (patch)
treed33af521aa6d3a7582143fe452d43a94767da34b /tests/QtGui/bug_693.py
parenta6f0d0cb5209655bd3f1727b9ddb03ff547104a6 (diff)
downloadpyside-13d9f714c5a990ff22b2e1621e1706ed81a1846b.tar.gz
pyside-13d9f714c5a990ff22b2e1621e1706ed81a1846b.tar.xz
pyside-13d9f714c5a990ff22b2e1621e1706ed81a1846b.zip
Add unit test for bug 693 - "Heap corruption or double free reported on program exit"
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtGui/bug_693.py')
-rw-r--r--tests/QtGui/bug_693.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/QtGui/bug_693.py b/tests/QtGui/bug_693.py
new file mode 100644
index 0000000..4bfbe7c
--- /dev/null
+++ b/tests/QtGui/bug_693.py
@@ -0,0 +1,31 @@
+
+from PySide.QtCore import *
+from PySide.QtGui import *
+import unittest
+
+class MyModel (QAbstractListModel):
+
+ stupidLine = QLine(0, 0, 10, 10)
+
+ def rowCount(self, parent):
+ return 1
+
+ def data(self, index, role):
+ return self.stupidLine
+
+class TestBug693(unittest.TestCase):
+ def testIt(self):
+ app = QApplication([])
+ model = MyModel()
+ view = QListView()
+ view.setModel(model)
+ view.show()
+
+ # This must NOT throw the exception:
+ # RuntimeError: Internal C++ object (PySide.QtCore.QLine) already deleted.
+ MyModel.stupidLine.isNull()
+
+
+
+if __name__ == "__main__":
+ unittest.main()