diff options
author | Christian Tismer <tismer@stackless.com> | 2022-03-07 18:30:38 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2022-03-07 21:37:36 +0100 |
commit | eee114ba211fddfd848ef911c3dfa2d017781add (patch) | |
tree | 119f985549a8783547e7cf460ac1f86a7f9ec303 /sources/shiboken6/tests/samplebinding | |
parent | d8791e4f5a0b92f32848d9281045344d8b357e8f (diff) |
Fix some tests checking deletion for PyPy, amended
Additionally to garbage collection, it was necessary in
two cases to break the cycle, explicitly.
This solves protected_test.py, completely.
[ChangeLog][shiboken6] A PyPy bug was not a bug but needed
garbage collection and cycle breakage.
amends <28099de59b5203166990a109fa8b176b22c6e377>
Task-number: PYSIDE-535
Task-number: PYSIDE-1843
Change-Id: I4ba1bbf957971322c50dc28db6607c146309d0da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/samplebinding')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/protected_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/protected_test.py b/sources/shiboken6/tests/samplebinding/protected_test.py index 4544f169e..52c5c912b 100644 --- a/sources/shiboken6/tests/samplebinding/protected_test.py +++ b/sources/shiboken6/tests/samplebinding/protected_test.py @@ -357,12 +357,16 @@ class ProtectedPropertyTest(unittest.TestCase): self.assertEqual(self.obj.protectedValueTypePointerProperty, pt2) self.assertTrue(self.obj.protectedValueTypePointerProperty is pt1) self.assertFalse(self.obj.protectedValueTypePointerProperty is pt2) + # PYSIDE-535: Need to assign None to break the cycle + self.obj.protectedValueTypePointerProperty = None def testProtectedObjectTypeProperty(self): '''Writes and reads a protected object type property.''' obj = ObjectType() self.obj.protectedObjectTypeProperty = obj self.assertEqual(self.obj.protectedObjectTypeProperty, obj) + # PYSIDE-535: Need to assign None to break the cycle + self.obj.protectedObjectTypeProperty = None class PrivateDtorProtectedMethodTest(unittest.TestCase): |