Created unit test for bug #778.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
parent
4bfd1759d4
commit
862e1a14b2
2 changed files with 23 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ PYSIDE_TEST(bug_736.py)
|
||||||
PYSIDE_TEST(bug_740.py)
|
PYSIDE_TEST(bug_740.py)
|
||||||
PYSIDE_TEST(bug_743.py)
|
PYSIDE_TEST(bug_743.py)
|
||||||
PYSIDE_TEST(bug_750.py)
|
PYSIDE_TEST(bug_750.py)
|
||||||
|
PYSIDE_TEST(bug_778.py)
|
||||||
PYSIDE_TEST(bug_793.py)
|
PYSIDE_TEST(bug_793.py)
|
||||||
PYSIDE_TEST(bug_811.py)
|
PYSIDE_TEST(bug_811.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
|
|
|
||||||
22
tests/QtGui/bug_778.py
Normal file
22
tests/QtGui/bug_778.py
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from helper import UsesQApplication
|
||||||
|
|
||||||
|
from PySide.QtGui import QTreeWidget, QTreeWidgetItem, QTreeWidgetItemIterator
|
||||||
|
|
||||||
|
class QTreeWidgetItemIteratorTest(UsesQApplication):
|
||||||
|
def testWidgetIterator(self):
|
||||||
|
treeWidget = QTreeWidget()
|
||||||
|
treeWidget.setColumnCount(1)
|
||||||
|
items = []
|
||||||
|
for i in range(10):
|
||||||
|
items.append(QTreeWidgetItem(None, ['item: %d' % i]))
|
||||||
|
treeWidget.insertTopLevelItems(0, items)
|
||||||
|
|
||||||
|
index = 0
|
||||||
|
for it in QTreeWidgetItemIterator(treeWidget):
|
||||||
|
self.assertEqual(it.value().text(0), 'item: %d' % index)
|
||||||
|
index += 1
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue