[pygobject] tests: Fix cairo test with pycairo >= 1.13



commit 20430e87c66b03ac05fbab8283a3771ce8364ad8
Author: Christoph Reiter <creiter src gnome org>
Date:   Fri Jun 9 13:13:57 2017 +0200

    tests: Fix cairo test with pycairo >= 1.13
    
    All pycairo functions now return an enum value which type is an int
    subclass. Remove the overly strict check for the return value type.

 tests/test_cairo.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_cairo.py b/tests/test_cairo.py
index 3edf5d5..06289e2 100644
--- a/tests/test_cairo.py
+++ b/tests/test_cairo.py
@@ -95,7 +95,7 @@ class TestPango(unittest.TestCase):
     def test_cairo_font_options(self):
         screen = Gtk.Window().get_screen()
         font_opts = screen.get_font_options()
-        self.assertEqual(type(font_opts.get_subpixel_order()), int)
+        self.assertTrue(isinstance(font_opts.get_subpixel_order(), int))
 
 
 if has_cairo:


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