summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-07-19 16:30:11 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-07-20 14:32:04 -0300
commitcb7d3e95a27392e504f3b99deacddb3a3e0a8a56 (patch)
tree8763560372bd07f9c0ee3561c2115810896d0d36 /tests
parentc62c36a64dd4c0fc0cd586c5c2b3d4f97ba3f769 (diff)
downloadpyside-cb7d3e95a27392e504f3b99deacddb3a3e0a8a56.tar.gz
pyside-cb7d3e95a27392e504f3b99deacddb3a3e0a8a56.tar.xz
pyside-cb7d3e95a27392e504f3b99deacddb3a3e0a8a56.zip
Fix bug#252.
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtSql/qsqldatabaseandqueries_test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/QtSql/qsqldatabaseandqueries_test.py b/tests/QtSql/qsqldatabaseandqueries_test.py
index 7a9d30a..41daccc 100644
--- a/tests/QtSql/qsqldatabaseandqueries_test.py
+++ b/tests/QtSql/qsqldatabaseandqueries_test.py
@@ -6,6 +6,12 @@ import unittest
from PySide import QtSql
from PySide.QtCore import *
+from PySide.QtGui import *
+
+class Foo(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.model = QtSql.QSqlTableModel()
class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase):
'''Test cases for QtSql database creation, destruction and queries'''
@@ -51,6 +57,14 @@ class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase):
lastname = query.value(0)
self.assertEqual(lastname, 'Harrison')
+ def testTableModelDeletion(self):
+ app = QApplication([])
+
+ bar = Foo()
+ model = bar.model
+ del bar
+ del app
+
if __name__ == '__main__':
unittest.main()