diff options
Diffstat (limited to 'sources/pyside6/tests/QtQml/bug_814.py')
-rw-r--r-- | sources/pyside6/tests/QtQml/bug_814.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtQml/bug_814.py b/sources/pyside6/tests/QtQml/bug_814.py index f90c8894d..9b5ac7af0 100644 --- a/sources/pyside6/tests/QtQml/bug_814.py +++ b/sources/pyside6/tests/QtQml/bug_814.py @@ -52,6 +52,7 @@ from helper.timedqapplication import TimedQApplication from PySide6.QtCore import QUrl, QAbstractListModel, QModelIndex, Qt from PySide6.QtQuick import QQuickView + class ListModel(QAbstractListModel): def __init__(self): super().__init__() @@ -59,7 +60,7 @@ class ListModel(QAbstractListModel): def roleNames(self): return { Qt.DisplayRole: b'pysideModelData' } - def rowCount(self, parent = QModelIndex()): + def rowCount(self, parent=QModelIndex()): return 3 def data(self, index, role): @@ -67,6 +68,7 @@ class ListModel(QAbstractListModel): return 'blubb' return None + class TestBug814(TimedQApplication): def testAbstractItemModelTransferToQML(self): view = QQuickView() @@ -79,6 +81,7 @@ class TestBug814(TimedQApplication): self.assertTrue(root, quickview_errorstring(view)) view.show() + if __name__ == '__main__': unittest.main() |