[pygobject/pygobject-3-12] Python 3.4 make check fixes



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

    Python 3.4 make check fixes
    
    Use unittest.skip() instead of unittest.expectedFailure() for tests which
    pass in GI 1.39.0. This is needed to get rid of unexpected successes which
    fail unittesting in Python 3.4.
    Silence deprecation warning when using imp.reload.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730411

 pygtkcompat/pygtkcompat.py |    4 +++-
 tests/test_gi.py           |    2 +-
 tests/test_repository.py   |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pygtkcompat/pygtkcompat.py b/pygtkcompat/pygtkcompat.py
index d5b7b94..f62a551 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 5f6e481..e790708 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -2005,7 +2005,7 @@ class TestGObject(unittest.TestCase):
 
         GIMarshallingTests.Object.none_inout(GIMarshallingTests.SubObject(int=42))
 
-    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=709796
+    @unittest.skip('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 c02581c..39722ef 100644
--- a/tests/test_repository.py
+++ b/tests/test_repository.py
@@ -213,7 +213,7 @@ 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.skip('https://bugzilla.gnome.org/show_bug.cgi?id=709462')
     @unittest.skipUnless(has_cairo, 'Regress needs cairo')
     def test_signal_info(self):
         repo.require('Regress')
@@ -231,7 +231,7 @@ 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.skip('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]