diff options
Diffstat (limited to 'sources/shiboken6/tests/samplebinding/modelview_test.py')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/modelview_test.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken6/tests/samplebinding/modelview_test.py b/sources/shiboken6/tests/samplebinding/modelview_test.py index 0b5c657d9..b5663a04e 100644 --- a/sources/shiboken6/tests/samplebinding/modelview_test.py +++ b/sources/shiboken6/tests/samplebinding/modelview_test.py @@ -2,7 +2,8 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -'''Test case for objects that keep references to other object without owning them (e.g. model/view relationships).''' +'''Test case for objects that keep references to other object without owning them + (e.g. model/view relationships).''' import os import sys @@ -17,9 +18,11 @@ from sample import ObjectModel, ObjectType, ObjectView object_name = 'test object' + class MyObject(ObjectType): pass + class ListModelKeepsReference(ObjectModel): def __init__(self, parent=None): ObjectModel.__init__(self, parent) @@ -29,6 +32,7 @@ class ListModelKeepsReference(ObjectModel): def data(self): return self.obj + class ListModelDoesntKeepsReference(ObjectModel): def data(self): obj = MyObject() @@ -55,4 +59,3 @@ class ModelViewTest(unittest.TestCase): if __name__ == '__main__': unittest.main() - |