[pygobject] test_gi: Fix failing tests with g-i 1.34.x
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_gi: Fix failing tests with g-i 1.34.x
- Date: Mon, 19 Nov 2012 09:41:32 +0000 (UTC)
commit f6c994c76cd8010460b76bf455e1a341348d735b
Author: Martin Pitt <martinpitt gnome org>
Date: Mon Nov 19 10:39:26 2012 +0100
test_gi: Fix failing tests with g-i 1.34.x
Skip tests which require g-i test API from 1.35.x when building with g-i
1.34.x.
tests/test_gi.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index e5b8b7e..270a883 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1012,11 +1012,15 @@ 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)
@@ -2617,6 +2621,8 @@ 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_variant'),
+ 'too old gobject-introspection')
def test_variant(self):
self.assertEqual(self.obj.props.some_variant, None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]