summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-29 19:20:50 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-07-29 19:29:17 -0300
commit1920130fc973f61b0e42f468df9576a917bf2b2e (patch)
tree4f685fab93556946c65e8cc49e11df577d8b422e /tests
parentee7b4826c0f0e487b75a70812dbcdcab00a0afdd (diff)
downloadpyside-1920130fc973f61b0e42f468df9576a917bf2b2e.tar.gz
pyside-1920130fc973f61b0e42f468df9576a917bf2b2e.tar.xz
pyside-1920130fc973f61b0e42f468df9576a917bf2b2e.zip
Fixed cyclic dependency on duck punching test.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-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 e20c0c1..880a8e4 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()