diff options
author | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-07-19 16:30:11 -0300 |
---|---|---|
committer | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-07-20 14:32:04 -0300 |
commit | cb7d3e95a27392e504f3b99deacddb3a3e0a8a56 (patch) | |
tree | 8763560372bd07f9c0ee3561c2115810896d0d36 /tests/QtSql | |
parent | c62c36a64dd4c0fc0cd586c5c2b3d4f97ba3f769 (diff) |
Fix bug#252.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtSql')
-rw-r--r-- | tests/QtSql/qsqldatabaseandqueries_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/QtSql/qsqldatabaseandqueries_test.py b/tests/QtSql/qsqldatabaseandqueries_test.py index 7a9d30a42..41daccc88 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() |