From eee114ba211fddfd848ef911c3dfa2d017781add Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 7 Mar 2022 18:30:38 +0100 Subject: 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 --- sources/shiboken6/tests/samplebinding/protected_test.py | 4 ++++ 1 file changed, 4 insertions(+) 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): -- cgit v1.2.3