aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore/duck_punching_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore/duck_punching_test.py')
-rw-r--r--tests/QtCore/duck_punching_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/QtCore/duck_punching_test.py b/tests/QtCore/duck_punching_test.py
index e20c0c1b1..880a8e435 100644
--- a/tests/QtCore/duck_punching_test.py
+++ b/tests/QtCore/duck_punching_test.py
@@ -37,6 +37,12 @@ class TestDuckPunchingOnQObjectInstance(UsesQCoreApplication):
child = QObject()
child.setParent(parent)
self.assert_(self.duck_childEvent_called)
+ # This is done to decrease the refcount of the vm object
+ # allowing the object wrapper to be deleted before the
+ # BindingManager. This is useful when compiling Shiboken
+ # for debug, since the BindingManager destructor has an
+ # assert that checks if the wrapper mapper is empty.
+ parent.childEvent = None
def testChildEventMonkeyPatchWithInheritance(self):
#Test if the new childEvent injected on a QObject's extension class instance is called from C++
@@ -50,6 +56,12 @@ class TestDuckPunchingOnQObjectInstance(UsesQCoreApplication):
child = QObject()
child.setParent(parent)
self.assert_(self.duck_childEvent_called)
+ # This is done to decrease the refcount of the vm object
+ # allowing the object wrapper to be deleted before the
+ # BindingManager. This is useful when compiling Shiboken
+ # for debug, since the BindingManager destructor has an
+ # assert that checks if the wrapper mapper is empty.
+ parent.childEvent = None
if __name__ == '__main__':
unittest.main()