aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/modelview_test.py
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2021-04-29 11:18:49 +0200
committerFriedemann Kleint <[email protected]>2021-04-29 15:56:58 +0200
commit6d2af409eedee377b3c2ba0cd8156b9409fabd9d (patch)
tree660f8fd87f77c1030cf97cc65345b9a941a321e4 /sources/pyside6/tests/pysidetest/modelview_test.py
parent88fff87519e741a3a999b8c1545834d116859faa (diff)
Tests: Fix some space-related flake8 warnings
Change-Id: I9b0ad08839bf1246620c557ec304dfa90882907b Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'sources/pyside6/tests/pysidetest/modelview_test.py')
-rw-r--r--sources/pyside6/tests/pysidetest/modelview_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/pyside6/tests/pysidetest/modelview_test.py b/sources/pyside6/tests/pysidetest/modelview_test.py
index 1aa72d98a..3329b5875 100644
--- a/sources/pyside6/tests/pysidetest/modelview_test.py
+++ b/sources/pyside6/tests/pysidetest/modelview_test.py
@@ -44,9 +44,11 @@ from PySide6.QtCore import QAbstractListModel, QObject, QModelIndex
object_name = 'test object'
+
class MyObject(QObject):
pass
+
class ListModelKeepsReference(QAbstractListModel):
def __init__(self, parent=None):
QAbstractListModel.__init__(self, parent)
@@ -59,6 +61,7 @@ class ListModelKeepsReference(QAbstractListModel):
def data(self, index, role):
return self.obj
+
class ListModelDoesntKeepsReference(QAbstractListModel):
def rowCount(self, parent=QModelIndex()):
return 1
@@ -68,6 +71,7 @@ class ListModelDoesntKeepsReference(QAbstractListModel):
obj.setObjectName(object_name)
return obj
+
class ListModelThatReturnsString(QAbstractListModel):
def rowCount(self, parent=QModelIndex()):
return 1
@@ -101,6 +105,7 @@ class ModelViewTest(unittest.TestCase):
self.assertEqual(type(obj), str)
self.assertEqual(obj, 'string')
+
if __name__ == '__main__':
unittest.main()