diff options
Diffstat (limited to 'sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py b/sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py index c486f2bcc..ab8e535b5 100644 --- a/sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py +++ b/sources/shiboken6/tests/samplebinding/typedtordoublefree_test.py @@ -12,6 +12,7 @@ from shiboken_paths import init_paths init_paths() from sample import ObjectType + class TestTypeDestructorDoubleFree(unittest.TestCase): def testTypeDestructorDoubleFree(self): '''Causes the type destructors of two derived classes to be called.''' @@ -22,13 +23,16 @@ class TestTypeDestructorDoubleFree(unittest.TestCase): obj = ExtObj1() child = ObjectType(parent=obj) self.assertEqual(obj.takeChild(child), child) + class ExtObj2(ObjectType): def __init__(self): ObjectType.__init__(self) + obj = ExtObj2() child = ObjectType(parent=obj) self.assertEqual(obj.takeChild(child), child) scope() + if __name__ == '__main__': unittest.main() |