aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/ownership_transference_test.py4
-rw-r--r--tests/samplebinding/typesystem_sample.xml4
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));
}
}
}