diff options
author | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-02-24 16:07:52 -0300 |
---|---|---|
committer | Luciano Wolf <luciano.wolf@openbossa.org> | 2010-02-26 16:22:35 -0300 |
commit | c7199a6ecbe5d4daf95f0e4629ea6cac4526cc19 (patch) | |
tree | 369bf835e790f934ec9aaaf6903f0825c3b07e81 /tests | |
parent | 915a34b39ff192b1f6c057721f326cd0d36588ec (diff) |
Fix bug #164 - __len__() function missing in QItemSelection.
Reviewed by Renato Araujo <renato.filho@openbossa.org>
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtgui/qitemselection_test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qtgui/qitemselection_test.py b/tests/qtgui/qitemselection_test.py new file mode 100644 index 000000000..8c6c34e03 --- /dev/null +++ b/tests/qtgui/qitemselection_test.py @@ -0,0 +1,18 @@ +import unittest + +from helper import UsesQApplication +from PySide.QtGui import QItemSelection, QStandardItemModel + +class QItemSelectionTest(UsesQApplication): + def testLen(self): + model = QStandardItemModel(2, 2) + model.insertRow(0) + model.insertRow(1) + model.insertColumn(0) + model.insertColumn(1) + selection = QItemSelection(model.index(0,0), model.index(1,1)) + self.assertEqual(len(selection), 1) + +if __name__ == '__main__': + unittest.main() + |