diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-07-29 19:20:50 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-07-29 19:29:17 -0300 |
commit | 1920130fc973f61b0e42f468df9576a917bf2b2e (patch) | |
tree | 4f685fab93556946c65e8cc49e11df577d8b422e | |
parent | ee7b4826c0f0e487b75a70812dbcdcab00a0afdd (diff) |
Fixed cyclic dependency on duck punching test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | tests/QtCore/duck_punching_test.py | 12 |
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() |