diff options
Diffstat (limited to 'tests/qtgui/parent_policy_test.py')
-rwxr-xr-x | tests/qtgui/parent_policy_test.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/qtgui/parent_policy_test.py b/tests/qtgui/parent_policy_test.py deleted file mode 100755 index e90da5a49..000000000 --- a/tests/qtgui/parent_policy_test.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -import unittest - -from helper import UsesQApplication -from PySide.QtCore import QAbstractTableModel, QVariant -from PySide.QtGui import QTableView - -class TestModel(QAbstractTableModel): - def __init__(self, parent=None): - QAbstractTableModel.__init__(self, parent) - def rowCount(self, parent): - return 0 - def columnCount(self, parent): - return 0 - def data(self, index, role): - return QVariant() - -class ParentPolicyTest(UsesQApplication): - - def testModelWithoutParent(self): - view = QTableView() - model = TestModel() - view.setModel(model) - samemodel = view.model() - self.assertEqual(model, samemodel) - - def testModelWithParent(self): - view = QTableView() - model = TestModel(self.app) - view.setModel(model) - samemodel = view.model() - self.assertEqual(model, samemodel) - -if __name__ == '__main__': - unittest.main() - |