summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-18 09:25:23 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-19 14:58:22 -0300
commit76c2a25f4def623be9c4ab30f2bde36bfed7ae08 (patch)
tree28630c716db27f489dd8fb0e8d8c2f6a448004f1 /tests
parent117a65fa1f9300151bb7dc5f33d4210135d615b7 (diff)
downloadshiboken-76c2a25f4def623be9c4ab30f2bde36bfed7ae08.tar.gz
shiboken-76c2a25f4def623be9c4ab30f2bde36bfed7ae08.tar.xz
shiboken-76c2a25f4def623be9c4ab30f2bde36bfed7ae08.zip
Updated some tests to work with new API.
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 1a8682da..5097d1e0 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 f6c049b8..37fa4742 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -178,9 +178,9 @@
if ((*it)->isLayoutType()) {
ObjectTypeLayout* l = reinterpret_cast&lt;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));
}
}
}