[pygobject] Python 3.4 make check fixes



commit 32542a4ba24d413fb6e0d509bff05f4ac3f642a1
Author: Simon Feltman <sfeltman src gnome org>
Date:   Mon May 26 03:01:13 2014 -0700

    Python 3.4 make check fixes
    
    Bump GI required version to 1.39.0. This is needed to get rid of
    expectedFailures which pass when built with 1.39.0 (unexpected successes
    fail unittesting in Python 3.4).
    Silence deprecation warning when using imp.reload.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730411

 configure.ac               |    2 +-
 pygtkcompat/pygtkcompat.py |    4 +++-
 tests/test_gi.py           |    1 -
 tests/test_repository.py   |    2 --
 4 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d18defc..77fe449 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ m4_define(pygobject_micro_version, 2)
 m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
 
 dnl versions of packages we require ...
-m4_define(introspection_required_version, 1.38.0)
+m4_define(introspection_required_version, 1.39.0)
 m4_define(py2cairo_required_version, 1.2.0)
 m4_define(py3cairo_required_version, 1.10.0)
 m4_define(glib_required_version, 2.38.0)
diff --git a/pygtkcompat/pygtkcompat.py b/pygtkcompat/pygtkcompat.py
index fcc9549..7ee2de4 100644
--- a/pygtkcompat/pygtkcompat.py
+++ b/pygtkcompat/pygtkcompat.py
@@ -38,8 +38,10 @@ import warnings
 try:
     # Python 3
     from collections import UserList
-    from imp import reload
     UserList  # pyflakes
+    with warnings.catch_warnings():
+        warnings.simplefilter('ignore')
+        from imp import reload
 except ImportError:
     # Python 2 ships that in a different module
     from UserList import UserList
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 31c0734..4a5d510 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -2008,7 +2008,6 @@ class TestGObject(unittest.TestCase):
 
         GIMarshallingTests.Object.none_inout(GIMarshallingTests.SubObject(int=42))
 
-    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=709796
     def test_object_full_inout(self):
         # Using gimarshallingtests.c from GI versions > 1.38.0 will show this
         # test as an "unexpected success" due to reference leak fixes in that file.
diff --git a/tests/test_repository.py b/tests/test_repository.py
index 6f62214..b73fbf9 100644
--- a/tests/test_repository.py
+++ b/tests/test_repository.py
@@ -220,7 +220,6 @@ class Test(unittest.TestCase):
         self.assertEqual(func_info.get_return_type().get_tag(), GIRepository.TypeTag.VOID)
         self.assertRaises(AttributeError, func_info.get_return_attribute, '_not_an_attr')
 
-    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=709462
     @unittest.skipUnless(has_cairo, 'Regress needs cairo')
     def test_signal_info(self):
         repo.require('Regress')
@@ -238,7 +237,6 @@ class Test(unittest.TestCase):
         self.assertFalse(sig_info.true_stops_emit())
         self.assertEqual(sig_info.get_flags(), sig_flags)
 
-    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=709462
     @unittest.skipUnless(has_cairo, 'Regress needs cairo')
     def test_notify_signal_info_with_obj(self):
         repo.require('Regress')


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