[pygobject] Drop test skipping due to too old g-i



commit a93eb5ecc982b5fe1bdf8f78b15ba10351a63b89
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Mar 25 08:44:24 2013 +0100

    Drop test skipping due to too old g-i
    
    We depend on gobject-introspection 1.35.9 now, which has all this API.

 tests/test_gi.py                |   24 ------------------------
 tests/test_object_marshaling.py |   14 --------------
 2 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 2671588..b6ef774 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -813,8 +813,6 @@ class TestArray(unittest.TestCase):
 
         GIMarshallingTests.array_struct_in([struct1, struct2, struct3])
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests, 'array_struct_value_in'),
-                         'too old gobject-introspection')
     def test_array_boxed_struct_value_in(self):
         struct1 = GIMarshallingTests.BoxedStruct()
         struct1.long_ = 1
@@ -970,8 +968,6 @@ class TestGArray(unittest.TestCase):
     def test_garray_utf8_full_out(self):
         self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_out())
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests, 'garray_utf8_full_out_caller_allocated'),
-                         'too old gobject-introspection')
     def test_garray_utf8_full_out_caller_allocated(self):
         self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_out_caller_allocated())
 
@@ -1029,15 +1025,11 @@ class TestGBytes(unittest.TestCase):
         self.assertEqual(3, b.get_size())
         self.assertEqual(b'\x00\x01\xFF', b.get_data())
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests, 'gbytes_full_return'),
-                         'too old gobject-introspection')
     def test_gbytes_full_return(self):
         b = GIMarshallingTests.gbytes_full_return()
         self.assertEqual(4, b.get_size())
         self.assertEqual(b'\x00\x31\xFF\x33', b.get_data())
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests, 'gbytes_full_return'),
-                         'too old gobject-introspection')
     def test_gbytes_none_in(self):
         b = GIMarshallingTests.gbytes_full_return()
         GIMarshallingTests.gbytes_none_in(b)
@@ -1497,8 +1489,6 @@ class TestEnum(unittest.TestCase):
                           GIMarshallingTests.NoTypeFlags.__gtype__)
 
 
- unittest skipUnless(hasattr(GIMarshallingTests.Object, 'vfunc_return_enum'),
-                     'GIMarshallingTests too old')
 class TestEnumVFuncResults(unittest.TestCase):
     class EnumTester(GIMarshallingTests.Object):
         def do_vfunc_return_enum(self):
@@ -1757,8 +1747,6 @@ class TestStructure(unittest.TestCase):
 
         del struct
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.BoxedStruct, 'string_'),
-                         'too old gobject-introspection')
     def test_boxed_struct(self):
         self.assertTrue(issubclass(GIMarshallingTests.BoxedStruct, GObject.GBoxed))
 
@@ -1771,8 +1759,6 @@ class TestStructure(unittest.TestCase):
 
         del struct
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.BoxedStruct, 'string_'),
-                         'too old gobject-introspection')
     def test_boxed_struct_new(self):
         struct = GIMarshallingTests.BoxedStruct.new()
         self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
@@ -1781,8 +1767,6 @@ class TestStructure(unittest.TestCase):
 
         del struct
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.BoxedStruct, 'string_'),
-                         'too old gobject-introspection')
     def test_boxed_struct_copy(self):
         struct = GIMarshallingTests.BoxedStruct()
         struct.long_ = 42
@@ -1796,8 +1780,6 @@ class TestStructure(unittest.TestCase):
         del new_struct
         del struct
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.BoxedStruct, 'string_'),
-                         'too old gobject-introspection')
     def test_boxed_struct_return(self):
         struct = GIMarshallingTests.boxed_struct_returnv()
 
@@ -2511,8 +2493,6 @@ class TestGError(unittest.TestCase):
 
 class TestParamSpec(unittest.TestCase):
     # https://bugzilla.gnome.org/show_bug.cgi?id=682355
-    @unittest.skipUnless(hasattr(GIMarshallingTests, 'param_spec_in_bool'),
-                         'too old gobject-introspection')
     @unittest.expectedFailure
     def test_param_spec_in_bool(self):
         ps = GObject.param_spec_boolean('mybool', 'test-bool', 'boolblurb',
@@ -2755,8 +2735,6 @@ class TestPropertiesObject(unittest.TestCase):
         obj = GIMarshallingTests.PropertiesObject(some_boxed_struct=struct1)
         self.assertEqual(obj.props.some_boxed_struct.long_, 1)
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.PropertiesObject, 'some_boxed_glist'),
-                         'too old gobject-introspection')
     def test_boxed_glist(self):
         self.assertEqual(self.obj.props.some_boxed_glist, [])
 
@@ -2776,8 +2754,6 @@ class TestPropertiesObject(unittest.TestCase):
         obj = GIMarshallingTests.PropertiesObject(some_boxed_glist=l)
         self.assertEqual(obj.props.some_boxed_glist, l)
 
-    @unittest.skipUnless(hasattr(GIMarshallingTests.PropertiesObject, 'some_variant'),
-                         'too old gobject-introspection')
     def test_variant(self):
         self.assertEqual(self.obj.props.some_variant, None)
 
diff --git a/tests/test_object_marshaling.py b/tests/test_object_marshaling.py
index 2432b44..624ed9d 100644
--- a/tests/test_object_marshaling.py
+++ b/tests/test_object_marshaling.py
@@ -87,9 +87,6 @@ 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.
@@ -200,9 +197,6 @@ 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
 
@@ -290,9 +284,6 @@ 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.
@@ -422,9 +413,6 @@ 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.
@@ -547,8 +535,6 @@ class TestVFuncsWithHeldFloatingArg(unittest.TestCase):
         self.assertTrue(held_object_ref() is None)
 
 
- unittest skipUnless(hasattr(GIMarshallingTests.PropertiesObject.props, 'some_object'),
-                     'too old gobject-introspection')
 class TestPropertyHoldingObject(unittest.TestCase):
     def test_props_getter_holding_object_ref_count(self):
         holder = GIMarshallingTests.PropertiesObject()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]