diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2010-11-18 09:25:23 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:08:58 -0300 |
commit | 31e6de8c9f237b1902be88baedf91ec9766bce87 (patch) | |
tree | 51238720adac555cdb7bc0eea1ee7a3e958ca830 | |
parent | 92c67b326b9ecaa896dc6277f74e97f2fb6c8aee (diff) |
Updated some tests to work with new API.
-rw-r--r-- | tests/samplebinding/ownership_transference_test.py | 4 | ||||
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/samplebinding/ownership_transference_test.py b/tests/samplebinding/ownership_transference_test.py index 1a8682da4..5097d1e0f 100644 --- a/tests/samplebinding/ownership_transference_test.py +++ b/tests/samplebinding/ownership_transference_test.py @@ -48,8 +48,8 @@ class BlackBoxTest(unittest.TestCase): self.assertEqual(set(bb.objects()), set([o1, o2])) self.assertEqual(str(o1.objectName()), 'object1') self.assertEqual(str(o2.objectName()), 'object2') - self.assertEqual(sys.getrefcount(o1), o1_refcnt) - self.assertEqual(sys.getrefcount(o2), o2_refcnt) + self.assertEqual(sys.getrefcount(o1), o1_refcnt + 1) # PySide give +1 ref to object with c++ ownership + self.assertEqual(sys.getrefcount(o2), o2_refcnt + 1) o2 = bb.retrieveObjectType(o2_ticket) self.assertEqual(sys.getrefcount(o2), o2_refcnt) del bb diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index f6c049b83..37fa4742e 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -178,9 +178,9 @@ if ((*it)->isLayoutType()) { ObjectTypeLayout* l = reinterpret_cast<ObjectTypeLayout*>(*it); reparent_layout_items(parent, %CONVERTTOPYTHON[ObjectTypeLayout*](l)); - Shiboken::setParent(layout, %CONVERTTOPYTHON[ObjectTypeLayout*](l)); + Wrapper::setParent(layout, %CONVERTTOPYTHON[ObjectTypeLayout*](l)); } else { - Shiboken::setParent(parent, %CONVERTTOPYTHON[ObjectType*](*it)); + Wrapper::setParent(parent, %CONVERTTOPYTHON[ObjectType*](*it)); } } } |