summaryrefslogtreecommitdiff
path: root/tests/test_object_marshaling.py
diff options
context:
space:
mode:
authorChristoph Reiter <christoph.reiter@gmx.at>2013-02-11 08:34:42 +0100
committerMartin Pitt <martinpitt@gnome.org>2013-02-11 08:34:42 +0100
commita37bfdcb3d9dcc8bcdd8126ad55d80fab4729c62 (patch)
tree954d9403c98314ccadd2ed392254b5fc8428713f /tests/test_object_marshaling.py
parentaff2ea1b681c3019f7dbdc841c2e33de78dbb88f (diff)
downloadpygobject-a37bfdcb3d9dcc8bcdd8126ad55d80fab4729c62.tar.gz
Skip some vfunc tests with gi 1.34
https://bugzilla.gnome.org/show_bug.cgi?id=693374
Diffstat (limited to 'tests/test_object_marshaling.py')
-rw-r--r--tests/test_object_marshaling.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_object_marshaling.py b/tests/test_object_marshaling.py
index c19b5a3b..62570bcf 100644
--- a/tests/test_object_marshaling.py
+++ b/tests/test_object_marshaling.py
@@ -87,6 +87,9 @@ class VFuncsBase(GIMarshallingTests.Object):
self.in_object_is_floating = obj.is_floating()
+@unittest.skipUnless(hasattr(VFuncsBase, 'get_ref_info_for_vfunc_return_object_transfer_none') and
+ hasattr(VFuncsBase, 'get_ref_info_for_vfunc_out_object_transfer_none'),
+ 'too old gobject-introspection')
class TestVFuncsWithObjectArg(unittest.TestCase):
# Basic set of tests which work on non-floating objects which python does
# not keep an additional reference of.
@@ -197,6 +200,9 @@ class TestVFuncsWithObjectArg(unittest.TestCase):
self.assertTrue(vfuncs.object_ref() is None)
+@unittest.skipUnless(hasattr(VFuncsBase, 'get_ref_info_for_vfunc_return_object_transfer_none') and
+ hasattr(VFuncsBase, 'get_ref_info_for_vfunc_out_object_transfer_none'),
+ 'too old gobject-introspection')
class TestVFuncsWithFloatingArg(unittest.TestCase):
# All tests here work with a floating object by using InitiallyUnowned as the argument
@@ -284,6 +290,9 @@ class TestVFuncsWithFloatingArg(unittest.TestCase):
self.assertTrue(vfuncs.object_ref() is None)
+@unittest.skipUnless(hasattr(VFuncsBase, 'get_ref_info_for_vfunc_return_object_transfer_none') and
+ hasattr(VFuncsBase, 'get_ref_info_for_vfunc_out_object_transfer_none'),
+ 'too old gobject-introspection')
class TestVFuncsWithHeldObjectArg(unittest.TestCase):
# Same tests as TestVFuncsWithObjectArg except we hold
# onto the python object reference in all cases.
@@ -413,6 +422,9 @@ class TestVFuncsWithHeldObjectArg(unittest.TestCase):
self.assertTrue(held_object_ref() is None)
+@unittest.skipUnless(hasattr(VFuncsBase, 'get_ref_info_for_vfunc_return_object_transfer_none') and
+ hasattr(VFuncsBase, 'get_ref_info_for_vfunc_out_object_transfer_none'),
+ 'too old gobject-introspection')
class TestVFuncsWithHeldFloatingArg(unittest.TestCase):
# Tests for a floating object which we hold a reference to the python wrapper
# on the VFuncs test class.
@@ -552,6 +564,8 @@ class TestPropertyHoldingObject(unittest.TestCase):
gc.collect()
self.assertEqual(held.__grefcount__, initial_ref_count)
+ @unittest.skipUnless(hasattr(GIMarshallingTests.PropertiesObject.props, 'some_object'),
+ 'too old gobject-introspection')
def test_get_property_holding_object_ref_count(self):
holder = GIMarshallingTests.PropertiesObject()
held = GObject.Object()