[pygobject] tests: Replace deprecated assertEquals() with assertEqual()



commit f82eca6006dec21624796074af8ffe9b2256f7a4
Author: Martin Pitt <martinpitt gnome org>
Date:   Sat Apr 21 14:00:50 2012 +0200

    tests: Replace deprecated assertEquals() with assertEqual()

 tests/test_everything.py  |  144 +++++++-------
 tests/test_gi.py          |  502 ++++++++++++++++++++++----------------------
 tests/test_gobject.py     |   58 +++---
 tests/test_option.py      |    6 +-
 tests/test_overrides.py   |  352 ++++++++++++++++----------------
 tests/test_properties.py  |   18 +-
 tests/test_pygtkcompat.py |   42 ++--
 7 files changed, 561 insertions(+), 561 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index d00f4f2..c54542c 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -37,16 +37,16 @@ class TestEverything(unittest.TestCase):
         surface = Everything.test_cairo_surface_none_return()
         self.assertTrue(isinstance(surface, cairo.ImageSurface))
         self.assertTrue(isinstance(surface, cairo.Surface))
-        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
-        self.assertEquals(surface.get_width(), 10)
-        self.assertEquals(surface.get_height(), 10)
+        self.assertEqual(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEqual(surface.get_width(), 10)
+        self.assertEqual(surface.get_height(), 10)
 
         surface = Everything.test_cairo_surface_full_return()
         self.assertTrue(isinstance(surface, cairo.ImageSurface))
         self.assertTrue(isinstance(surface, cairo.Surface))
-        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
-        self.assertEquals(surface.get_width(), 10)
-        self.assertEquals(surface.get_height(), 10)
+        self.assertEqual(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEqual(surface.get_width(), 10)
+        self.assertEqual(surface.get_height(), 10)
 
         surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10)
         Everything.test_cairo_surface_none_in(surface)
@@ -54,28 +54,28 @@ class TestEverything(unittest.TestCase):
         surface = Everything.test_cairo_surface_full_out()
         self.assertTrue(isinstance(surface, cairo.ImageSurface))
         self.assertTrue(isinstance(surface, cairo.Surface))
-        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
-        self.assertEquals(surface.get_width(), 10)
-        self.assertEquals(surface.get_height(), 10)
+        self.assertEqual(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEqual(surface.get_width(), 10)
+        self.assertEqual(surface.get_height(), 10)
 
     def test_unichar(self):
-        self.assertEquals("c", Everything.test_unichar("c"))
+        self.assertEqual("c", Everything.test_unichar("c"))
 
         if sys.version_info < (3, 0):
-            self.assertEquals(UNICHAR, Everything.test_unichar(PY2_UNICODE_UNICHAR))
-        self.assertEquals(UNICHAR, Everything.test_unichar(UNICHAR))
+            self.assertEqual(UNICHAR, Everything.test_unichar(PY2_UNICODE_UNICHAR))
+        self.assertEqual(UNICHAR, Everything.test_unichar(UNICHAR))
         self.assertRaises(TypeError, Everything.test_unichar, "")
         self.assertRaises(TypeError, Everything.test_unichar, "morethanonechar")
 
     def test_floating(self):
         e = Everything.TestFloating()
-        self.assertEquals(e.__grefcount__, 1)
+        self.assertEqual(e.__grefcount__, 1)
 
         e = GObject.new(Everything.TestFloating)
-        self.assertEquals(e.__grefcount__, 1)
+        self.assertEqual(e.__grefcount__, 1)
 
         e = Everything.TestFloating.new()
-        self.assertEquals(e.__grefcount__, 1)
+        self.assertEqual(e.__grefcount__, 1)
 
     def test_caller_allocates(self):
         struct_a = Everything.TestStructA()
@@ -86,10 +86,10 @@ class TestEverything(unittest.TestCase):
 
         struct_a_clone = struct_a.clone()
         self.assertTrue(struct_a != struct_a_clone)
-        self.assertEquals(struct_a.some_int, struct_a_clone.some_int)
-        self.assertEquals(struct_a.some_int8, struct_a_clone.some_int8)
-        self.assertEquals(struct_a.some_double, struct_a_clone.some_double)
-        self.assertEquals(struct_a.some_enum, struct_a_clone.some_enum)
+        self.assertEqual(struct_a.some_int, struct_a_clone.some_int)
+        self.assertEqual(struct_a.some_int8, struct_a_clone.some_int8)
+        self.assertEqual(struct_a.some_double, struct_a_clone.some_double)
+        self.assertEqual(struct_a.some_enum, struct_a_clone.some_enum)
 
         struct_b = Everything.TestStructB()
         struct_b.some_int8 = 8
@@ -100,30 +100,30 @@ class TestEverything(unittest.TestCase):
 
         struct_b_clone = struct_b.clone()
         self.assertTrue(struct_b != struct_b_clone)
-        self.assertEquals(struct_b.some_int8, struct_b_clone.some_int8)
-        self.assertEquals(struct_b.nested_a.some_int, struct_b_clone.nested_a.some_int)
-        self.assertEquals(struct_b.nested_a.some_int8, struct_b_clone.nested_a.some_int8)
-        self.assertEquals(struct_b.nested_a.some_double, struct_b_clone.nested_a.some_double)
-        self.assertEquals(struct_b.nested_a.some_enum, struct_b_clone.nested_a.some_enum)
+        self.assertEqual(struct_b.some_int8, struct_b_clone.some_int8)
+        self.assertEqual(struct_b.nested_a.some_int, struct_b_clone.nested_a.some_int)
+        self.assertEqual(struct_b.nested_a.some_int8, struct_b_clone.nested_a.some_int8)
+        self.assertEqual(struct_b.nested_a.some_double, struct_b_clone.nested_a.some_double)
+        self.assertEqual(struct_b.nested_a.some_enum, struct_b_clone.nested_a.some_enum)
 
     def test_wrong_type_of_arguments(self):
         try:
             Everything.test_int8()
         except TypeError:
             (e_type, e) = sys.exc_info()[:2]
-            self.assertEquals(e.args, ("test_int8() takes exactly 1 argument (0 given)",))
+            self.assertEqual(e.args, ("test_int8() takes exactly 1 argument (0 given)",))
 
     def test_gtypes(self):
         gchararray_gtype = GObject.type_from_name('gchararray')
         gtype = Everything.test_gtype(str)
-        self.assertEquals(gchararray_gtype, gtype)
+        self.assertEqual(gchararray_gtype, gtype)
         gtype = Everything.test_gtype('gchararray')
-        self.assertEquals(gchararray_gtype, gtype)
+        self.assertEqual(gchararray_gtype, gtype)
         gobject_gtype = GObject.GObject.__gtype__
         gtype = Everything.test_gtype(GObject.GObject)
-        self.assertEquals(gobject_gtype, gtype)
+        self.assertEqual(gobject_gtype, gtype)
         gtype = Everything.test_gtype('GObject')
-        self.assertEquals(gobject_gtype, gtype)
+        self.assertEqual(gobject_gtype, gtype)
         self.assertRaises(TypeError, Everything.test_gtype, 'invalidgtype')
 
         class NotARegisteredClass(object):
@@ -135,9 +135,9 @@ class TestEverything(unittest.TestCase):
             __gtype_name__ = 'EverythingTestsARegisteredClass'
 
         gtype = Everything.test_gtype('EverythingTestsARegisteredClass')
-        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        self.assertEqual(ARegisteredClass.__gtype__, gtype)
         gtype = Everything.test_gtype(ARegisteredClass)
-        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        self.assertEqual(ARegisteredClass.__gtype__, gtype)
         self.assertRaises(TypeError, Everything.test_gtype, 'ARegisteredClass')
 
     def test_dir(self):
@@ -161,19 +161,19 @@ class TestEverything(unittest.TestCase):
     def test_ptrarray(self):
         # transfer container
         result = Everything.test_garray_container_return()
-        self.assertEquals(result, ['regress'])
+        self.assertEqual(result, ['regress'])
         result = None
 
         # transfer full
         result = Everything.test_garray_full_return()
-        self.assertEquals(result, ['regress'])
+        self.assertEqual(result, ['regress'])
         result = None
 
     def test_hash_return(self):
         result = Everything.test_ghash_gvalue_return()
-        self.assertEquals(result['integer'], 12)
-        self.assertEquals(result['boolean'], True)
-        self.assertEquals(result['string'], 'some text')
+        self.assertEqual(result['integer'], 12)
+        self.assertEqual(result['boolean'], True)
+        self.assertEqual(result['string'], 'some text')
         strings = result['strings']
         self.assertTrue('first' in strings)
         self.assertTrue('second' in strings)
@@ -198,15 +198,15 @@ class TestEverything(unittest.TestCase):
 
         l2 = l1
         self.assertEqual(l1.data, l2.data)
-        self.assertEquals(getrefcount(l1), init_refcount + 1)
+        self.assertEqual(getrefcount(l1), init_refcount + 1)
 
         l3 = copy.copy(l1)
         l3.data = 'bar'
         self.assertEqual(l1.data, 'foo')
         self.assertEqual(l2.data, 'foo')
         self.assertEqual(l3.data, 'bar')
-        self.assertEquals(getrefcount(l1), init_refcount + 1)
-        self.assertEquals(getrefcount(l3), init_refcount)
+        self.assertEqual(getrefcount(l1), init_refcount + 1)
+        self.assertEqual(getrefcount(l3), init_refcount)
 
 
 class TestNullableArgs(unittest.TestCase):
@@ -299,7 +299,7 @@ class TestCallbacks(unittest.TestCase):
             TestCallbacks.called = True
             return 44
 
-        self.assertEquals(Everything.test_callback(callback), 44)
+        self.assertEqual(Everything.test_callback(callback), 44)
         self.assertTrue(TestCallbacks.called)
 
     def test_callback_async(self):
@@ -311,7 +311,7 @@ class TestCallbacks(unittest.TestCase):
 
         Everything.test_callback_async(callback, 44)
         i = Everything.test_callback_thaw_async()
-        self.assertEquals(44, i)
+        self.assertEqual(44, i)
         self.assertTrue(TestCallbacks.called)
 
     def test_callback_scope_call(self):
@@ -322,21 +322,21 @@ class TestCallbacks(unittest.TestCase):
             return 0
 
         Everything.test_multi_callback(callback)
-        self.assertEquals(TestCallbacks.called, 2)
+        self.assertEqual(TestCallbacks.called, 2)
 
     def test_callback_userdata(self):
         TestCallbacks.called = 0
 
         def callback(userdata):
-            self.assertEquals(userdata, "Test%d" % TestCallbacks.called)
+            self.assertEqual(userdata, "Test%d" % TestCallbacks.called)
             TestCallbacks.called += 1
             return TestCallbacks.called
 
         for i in range(100):
             val = Everything.test_callback_user_data(callback, "Test%d" % i)
-            self.assertEquals(val, i + 1)
+            self.assertEqual(val, i + 1)
 
-        self.assertEquals(TestCallbacks.called, 100)
+        self.assertEqual(TestCallbacks.called, 100)
 
     def test_callback_userdata_refcount(self):
         TestCallbacks.called = False
@@ -354,7 +354,7 @@ class TestCallbacks(unittest.TestCase):
         Everything.test_callback_thaw_notifications()
         end_ref_count = getrefcount(ud)
 
-        self.assertEquals(start_ref_count, end_ref_count)
+        self.assertEqual(start_ref_count, end_ref_count)
 
     def test_async_ready_callback(self):
         TestCallbacks.called = False
@@ -376,9 +376,9 @@ class TestCallbacks(unittest.TestCase):
             return 42
 
         TestCallbacks.called = False
-        self.assertEquals(Everything.test_callback_destroy_notify(callback, 42), 42)
+        self.assertEqual(Everything.test_callback_destroy_notify(callback, 42), 42)
         self.assertTrue(TestCallbacks.called)
-        self.assertEquals(Everything.test_callback_thaw_notifications(), 42)
+        self.assertEqual(Everything.test_callback_thaw_notifications(), 42)
 
     def test_callback_in_methods(self):
         object_ = Everything.TestObj()
@@ -483,67 +483,67 @@ class TestProperties(unittest.TestCase):
     def test_basic(self):
         object_ = Everything.TestObj()
 
-        self.assertEquals(object_.props.int, 0)
+        self.assertEqual(object_.props.int, 0)
         object_.props.int = 42
         self.assertTrue(isinstance(object_.props.int, int))
-        self.assertEquals(object_.props.int, 42)
+        self.assertEqual(object_.props.int, 42)
 
-        self.assertEquals(object_.props.float, 0.0)
+        self.assertEqual(object_.props.float, 0.0)
         object_.props.float = 42.42
         self.assertTrue(isinstance(object_.props.float, float))
         self.assertAlmostEquals(object_.props.float, 42.42, places=5)
 
-        self.assertEquals(object_.props.double, 0.0)
+        self.assertEqual(object_.props.double, 0.0)
         object_.props.double = 42.42
         self.assertTrue(isinstance(object_.props.double, float))
         self.assertAlmostEquals(object_.props.double, 42.42, places=5)
 
-        self.assertEquals(object_.props.string, None)
+        self.assertEqual(object_.props.string, None)
         object_.props.string = 'mec'
         self.assertTrue(isinstance(object_.props.string, str))
-        self.assertEquals(object_.props.string, 'mec')
+        self.assertEqual(object_.props.string, 'mec')
 
-        self.assertEquals(object_.props.gtype, GObject.TYPE_INVALID)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_INVALID)
         object_.props.gtype = int
-        self.assertEquals(object_.props.gtype, GObject.TYPE_INT)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_INT)
 
     def test_hash_table(self):
         object_ = Everything.TestObj()
-        self.assertEquals(object_.props.hash_table, None)
+        self.assertEqual(object_.props.hash_table, None)
 
         object_.props.hash_table = {'mec': 56}
         self.assertTrue(isinstance(object_.props.hash_table, dict))
-        self.assertEquals(list(object_.props.hash_table.items())[0], ('mec', 56))
+        self.assertEqual(list(object_.props.hash_table.items())[0], ('mec', 56))
 
     def test_list(self):
         object_ = Everything.TestObj()
-        self.assertEquals(object_.props.list, [])
+        self.assertEqual(object_.props.list, [])
 
         object_.props.list = ['1', '2', '3']
         self.assertTrue(isinstance(object_.props.list, list))
-        self.assertEquals(object_.props.list, ['1', '2', '3'])
+        self.assertEqual(object_.props.list, ['1', '2', '3'])
 
     def test_boxed(self):
         object_ = Everything.TestObj()
-        self.assertEquals(object_.props.boxed, None)
+        self.assertEqual(object_.props.boxed, None)
 
         boxed = Everything.TestBoxed()
         boxed.some_int8 = 42
         object_.props.boxed = boxed
 
         self.assertTrue(isinstance(object_.props.boxed, Everything.TestBoxed))
-        self.assertEquals(object_.props.boxed.some_int8, 42)
+        self.assertEqual(object_.props.boxed.some_int8, 42)
 
     def test_gtype(self):
         object_ = Everything.TestObj()
-        self.assertEquals(object_.props.gtype, GObject.TYPE_INVALID)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_INVALID)
         object_.props.gtype = int
-        self.assertEquals(object_.props.gtype, GObject.TYPE_INT)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_INT)
 
         object_ = Everything.TestObj(gtype=int)
-        self.assertEquals(object_.props.gtype, GObject.TYPE_INT)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_INT)
         object_.props.gtype = str
-        self.assertEquals(object_.props.gtype, GObject.TYPE_STRING)
+        self.assertEqual(object_.props.gtype, GObject.TYPE_STRING)
 
 
 class TestTortureProfile(unittest.TestCase):
@@ -618,10 +618,10 @@ class TestAdvancedInterfaces(unittest.TestCase):
     def test_obj_skip_return_val(self):
         obj = Everything.TestObj()
         ret = obj.skip_return_val(50, 42.0, 60, 2, 3)
-        self.assertEquals(len(ret), 3)
-        self.assertEquals(ret[0], 51)
-        self.assertEquals(ret[1], 61)
-        self.assertEquals(ret[2], 32)
+        self.assertEqual(len(ret), 3)
+        self.assertEqual(ret[0], 51)
+        self.assertEqual(ret[1], 61)
+        self.assertEqual(ret[2], 32)
 
     def test_obj_skip_return_val_no_out(self):
         obj = Everything.TestObj()
@@ -629,7 +629,7 @@ class TestAdvancedInterfaces(unittest.TestCase):
         self.assertRaises(GLib.GError, obj.skip_return_val_no_out, 0)
 
         ret = obj.skip_return_val_no_out(1)
-        self.assertEquals(ret, None)
+        self.assertEqual(ret, None)
 
 
 class TestSignals(unittest.TestCase):
@@ -637,7 +637,7 @@ class TestSignals(unittest.TestCase):
         obj = Everything.TestObj()
 
         def callback(obj, obj_param):
-            self.assertEquals(obj_param.props.int, 3)
+            self.assertEqual(obj_param.props.int, 3)
             self.assertGreater(obj_param.__grefcount__, 1)
 
         obj.connect('sig-with-obj', callback)
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 985eb5d..2b5b5a1 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -55,17 +55,17 @@ class TestConstant(unittest.TestCase):
 
 # Blocked by https://bugzilla.gnome.org/show_bug.cgi?id=595773
 #    def test_constant_utf8(self):
-#        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.CONSTANT_UTF8)
+#        self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.CONSTANT_UTF8)
 
     def test_constant_number(self):
-        self.assertEquals(CONSTANT_NUMBER, GIMarshallingTests.CONSTANT_NUMBER)
+        self.assertEqual(CONSTANT_NUMBER, GIMarshallingTests.CONSTANT_NUMBER)
 
 
 class TestBoolean(unittest.TestCase):
 
     def test_boolean_return(self):
-        self.assertEquals(True, GIMarshallingTests.boolean_return_true())
-        self.assertEquals(False, GIMarshallingTests.boolean_return_false())
+        self.assertEqual(True, GIMarshallingTests.boolean_return_true())
+        self.assertEqual(False, GIMarshallingTests.boolean_return_false())
 
     def test_boolean_in(self):
         GIMarshallingTests.boolean_in_true(True)
@@ -75,12 +75,12 @@ class TestBoolean(unittest.TestCase):
         GIMarshallingTests.boolean_in_false(0)
 
     def test_boolean_out(self):
-        self.assertEquals(True, GIMarshallingTests.boolean_out_true())
-        self.assertEquals(False, GIMarshallingTests.boolean_out_false())
+        self.assertEqual(True, GIMarshallingTests.boolean_out_true())
+        self.assertEqual(False, GIMarshallingTests.boolean_out_false())
 
     def test_boolean_inout(self):
-        self.assertEquals(False, GIMarshallingTests.boolean_inout_true_false(True))
-        self.assertEquals(True, GIMarshallingTests.boolean_inout_false_true(False))
+        self.assertEqual(False, GIMarshallingTests.boolean_inout_true_false(True))
+        self.assertEqual(True, GIMarshallingTests.boolean_inout_false_true(False))
 
 
 class TestInt8(unittest.TestCase):
@@ -89,8 +89,8 @@ class TestInt8(unittest.TestCase):
     MIN = GObject.G_MININT8
 
     def test_int8_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int8_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int8_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int8_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int8_return_min())
 
     def test_int8_in(self):
         max = Number(self.MAX)
@@ -108,12 +108,12 @@ class TestInt8(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.int8_in_max, "self.MAX")
 
     def test_int8_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int8_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int8_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int8_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int8_out_min())
 
     def test_int8_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.int8_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.int8_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.int8_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.int8_inout_min_max(Number(self.MIN)))
 
 
 class TestUInt8(unittest.TestCase):
@@ -121,7 +121,7 @@ class TestUInt8(unittest.TestCase):
     MAX = GObject.G_MAXUINT8
 
     def test_uint8_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint8_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint8_return())
 
     def test_uint8_in(self):
         number = Number(self.MAX)
@@ -136,10 +136,10 @@ class TestUInt8(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.uint8_in, "self.MAX")
 
     def test_uint8_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint8_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint8_out())
 
     def test_uint8_inout(self):
-        self.assertEquals(0, GIMarshallingTests.uint8_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.uint8_inout(Number(self.MAX)))
 
 
 class TestInt16(unittest.TestCase):
@@ -148,8 +148,8 @@ class TestInt16(unittest.TestCase):
     MIN = GObject.G_MININT16
 
     def test_int16_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int16_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int16_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int16_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int16_return_min())
 
     def test_int16_in(self):
         max = Number(self.MAX)
@@ -167,12 +167,12 @@ class TestInt16(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.int16_in_max, "self.MAX")
 
     def test_int16_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int16_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int16_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int16_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int16_out_min())
 
     def test_int16_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.int16_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.int16_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.int16_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.int16_inout_min_max(Number(self.MIN)))
 
 
 class TestUInt16(unittest.TestCase):
@@ -180,7 +180,7 @@ class TestUInt16(unittest.TestCase):
     MAX = GObject.G_MAXUINT16
 
     def test_uint16_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint16_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint16_return())
 
     def test_uint16_in(self):
         number = Number(self.MAX)
@@ -195,10 +195,10 @@ class TestUInt16(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.uint16_in, "self.MAX")
 
     def test_uint16_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint16_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint16_out())
 
     def test_uint16_inout(self):
-        self.assertEquals(0, GIMarshallingTests.uint16_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.uint16_inout(Number(self.MAX)))
 
 
 class TestInt32(unittest.TestCase):
@@ -207,8 +207,8 @@ class TestInt32(unittest.TestCase):
     MIN = GObject.G_MININT32
 
     def test_int32_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int32_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int32_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int32_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int32_return_min())
 
     def test_int32_in(self):
         max = Number(self.MAX)
@@ -226,12 +226,12 @@ class TestInt32(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.int32_in_max, "self.MAX")
 
     def test_int32_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int32_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int32_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int32_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int32_out_min())
 
     def test_int32_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.int32_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.int32_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.int32_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.int32_inout_min_max(Number(self.MIN)))
 
 
 class TestUInt32(unittest.TestCase):
@@ -239,7 +239,7 @@ class TestUInt32(unittest.TestCase):
     MAX = GObject.G_MAXUINT32
 
     def test_uint32_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint32_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint32_return())
 
     def test_uint32_in(self):
         number = Number(self.MAX)
@@ -254,10 +254,10 @@ class TestUInt32(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.uint32_in, "self.MAX")
 
     def test_uint32_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint32_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint32_out())
 
     def test_uint32_inout(self):
-        self.assertEquals(0, GIMarshallingTests.uint32_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.uint32_inout(Number(self.MAX)))
 
 
 class TestInt64(unittest.TestCase):
@@ -266,8 +266,8 @@ class TestInt64(unittest.TestCase):
     MIN = - (2 ** 63)
 
     def test_int64_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int64_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int64_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int64_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int64_return_min())
 
     def test_int64_in(self):
         max = Number(self.MAX)
@@ -285,12 +285,12 @@ class TestInt64(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.int64_in_max, "self.MAX")
 
     def test_int64_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int64_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int64_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int64_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int64_out_min())
 
     def test_int64_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.int64_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.int64_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.int64_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.int64_inout_min_max(Number(self.MIN)))
 
 
 class TestUInt64(unittest.TestCase):
@@ -298,7 +298,7 @@ class TestUInt64(unittest.TestCase):
     MAX = 2 ** 64 - 1
 
     def test_uint64_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint64_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint64_return())
 
     def test_uint64_in(self):
         number = Number(self.MAX)
@@ -313,10 +313,10 @@ class TestUInt64(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.uint64_in, "self.MAX")
 
     def test_uint64_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint64_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint64_out())
 
     def test_uint64_inout(self):
-        self.assertEquals(0, GIMarshallingTests.uint64_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.uint64_inout(Number(self.MAX)))
 
 
 class TestShort(unittest.TestCase):
@@ -325,8 +325,8 @@ class TestShort(unittest.TestCase):
     MIN = GObject.constants.G_MINSHORT
 
     def test_short_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.short_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.short_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.short_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.short_return_min())
 
     def test_short_in(self):
         max = Number(self.MAX)
@@ -344,12 +344,12 @@ class TestShort(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.short_in_max, "self.MAX")
 
     def test_short_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.short_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.short_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.short_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.short_out_min())
 
     def test_short_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.short_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.short_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.short_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.short_inout_min_max(Number(self.MIN)))
 
 
 class TestUShort(unittest.TestCase):
@@ -357,7 +357,7 @@ class TestUShort(unittest.TestCase):
     MAX = GObject.constants.G_MAXUSHORT
 
     def test_ushort_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ushort_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.ushort_return())
 
     def test_ushort_in(self):
         number = Number(self.MAX)
@@ -372,10 +372,10 @@ class TestUShort(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.ushort_in, "self.MAX")
 
     def test_ushort_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ushort_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.ushort_out())
 
     def test_ushort_inout(self):
-        self.assertEquals(0, GIMarshallingTests.ushort_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.ushort_inout(Number(self.MAX)))
 
 
 class TestInt(unittest.TestCase):
@@ -384,8 +384,8 @@ class TestInt(unittest.TestCase):
     MIN = GObject.constants.G_MININT
 
     def test_int_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int_return_min())
 
     def test_int_in(self):
         max = Number(self.MAX)
@@ -403,12 +403,12 @@ class TestInt(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.int_in_max, "self.MAX")
 
     def test_int_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.int_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.int_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.int_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.int_out_min())
 
     def test_int_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.int_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.int_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.int_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.int_inout_min_max(Number(self.MIN)))
         self.assertRaises(TypeError, GIMarshallingTests.int_inout_min_max, Number(self.MIN), CONSTANT_NUMBER)
 
 
@@ -417,7 +417,7 @@ class TestUInt(unittest.TestCase):
     MAX = GObject.constants.G_MAXUINT
 
     def test_uint_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint_return())
 
     def test_uint_in(self):
         number = Number(self.MAX)
@@ -432,10 +432,10 @@ class TestUInt(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.uint_in, "self.MAX")
 
     def test_uint_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.uint_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.uint_out())
 
     def test_uint_inout(self):
-        self.assertEquals(0, GIMarshallingTests.uint_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.uint_inout(Number(self.MAX)))
 
 
 class TestLong(unittest.TestCase):
@@ -444,8 +444,8 @@ class TestLong(unittest.TestCase):
     MIN = GObject.constants.G_MINLONG
 
     def test_long_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.long_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.long_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.long_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.long_return_min())
 
     def test_long_in(self):
         max = Number(self.MAX)
@@ -463,12 +463,12 @@ class TestLong(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.long_in_max, "self.MAX")
 
     def test_long_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.long_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.long_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.long_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.long_out_min())
 
     def test_long_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.long_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.long_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.long_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.long_inout_min_max(Number(self.MIN)))
 
 
 class TestULong(unittest.TestCase):
@@ -476,7 +476,7 @@ class TestULong(unittest.TestCase):
     MAX = GObject.constants.G_MAXULONG
 
     def test_ulong_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ulong_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.ulong_return())
 
     def test_ulong_in(self):
         number = Number(self.MAX)
@@ -491,10 +491,10 @@ class TestULong(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.ulong_in, "self.MAX")
 
     def test_ulong_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ulong_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.ulong_out())
 
     def test_ulong_inout(self):
-        self.assertEquals(0, GIMarshallingTests.ulong_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.ulong_inout(Number(self.MAX)))
 
 
 class TestSSize(unittest.TestCase):
@@ -503,8 +503,8 @@ class TestSSize(unittest.TestCase):
     MIN = GObject.constants.G_MINLONG
 
     def test_ssize_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ssize_return_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.ssize_return_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.ssize_return_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.ssize_return_min())
 
     def test_ssize_in(self):
         max = Number(self.MAX)
@@ -522,12 +522,12 @@ class TestSSize(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.ssize_in_max, "self.MAX")
 
     def test_ssize_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.ssize_out_max())
-        self.assertEquals(self.MIN, GIMarshallingTests.ssize_out_min())
+        self.assertEqual(self.MAX, GIMarshallingTests.ssize_out_max())
+        self.assertEqual(self.MIN, GIMarshallingTests.ssize_out_min())
 
     def test_ssize_inout(self):
-        self.assertEquals(self.MIN, GIMarshallingTests.ssize_inout_max_min(Number(self.MAX)))
-        self.assertEquals(self.MAX, GIMarshallingTests.ssize_inout_min_max(Number(self.MIN)))
+        self.assertEqual(self.MIN, GIMarshallingTests.ssize_inout_max_min(Number(self.MAX)))
+        self.assertEqual(self.MAX, GIMarshallingTests.ssize_inout_min_max(Number(self.MIN)))
 
 
 class TestSize(unittest.TestCase):
@@ -535,7 +535,7 @@ class TestSize(unittest.TestCase):
     MAX = GObject.constants.G_MAXULONG
 
     def test_size_return(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.size_return())
+        self.assertEqual(self.MAX, GIMarshallingTests.size_return())
 
     def test_size_in(self):
         number = Number(self.MAX)
@@ -550,10 +550,10 @@ class TestSize(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.size_in, "self.MAX")
 
     def test_size_out(self):
-        self.assertEquals(self.MAX, GIMarshallingTests.size_out())
+        self.assertEqual(self.MAX, GIMarshallingTests.size_out())
 
     def test_size_inout(self):
-        self.assertEquals(0, GIMarshallingTests.size_inout(Number(self.MAX)))
+        self.assertEqual(0, GIMarshallingTests.size_inout(Number(self.MAX)))
 
 
 class TestFloat(unittest.TestCase):
@@ -599,8 +599,8 @@ class TestDouble(unittest.TestCase):
 class TestGType(unittest.TestCase):
 
     def test_gtype_name(self):
-        self.assertEquals("void", GObject.TYPE_NONE.name)
-        self.assertEquals("gchararray", GObject.TYPE_STRING.name)
+        self.assertEqual("void", GObject.TYPE_NONE.name)
+        self.assertEqual("gchararray", GObject.TYPE_STRING.name)
 
         def check_readonly(gtype):
             gtype.name = "foo"
@@ -609,8 +609,8 @@ class TestGType(unittest.TestCase):
         self.assertRaises(AttributeError, check_readonly, GObject.TYPE_STRING)
 
     def test_gtype_return(self):
-        self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_return())
-        self.assertEquals(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_return())
+        self.assertEqual(GObject.TYPE_NONE, GIMarshallingTests.gtype_return())
+        self.assertEqual(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_return())
 
     def test_gtype_in(self):
         GIMarshallingTests.gtype_in(GObject.TYPE_NONE)
@@ -619,20 +619,20 @@ class TestGType(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.gtype_string_in, "foo")
 
     def test_gtype_out(self):
-        self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_out())
-        self.assertEquals(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_out())
+        self.assertEqual(GObject.TYPE_NONE, GIMarshallingTests.gtype_out())
+        self.assertEqual(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_out())
 
     def test_gtype_inout(self):
-        self.assertEquals(GObject.TYPE_INT, GIMarshallingTests.gtype_inout(GObject.TYPE_NONE))
+        self.assertEqual(GObject.TYPE_INT, GIMarshallingTests.gtype_inout(GObject.TYPE_NONE))
 
 
 class TestUtf8(unittest.TestCase):
 
     def test_utf8_none_return(self):
-        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_none_return())
+        self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.utf8_none_return())
 
     def test_utf8_full_return(self):
-        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_full_return())
+        self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.utf8_full_return())
 
     def test_utf8_none_in(self):
         GIMarshallingTests.utf8_none_in(CONSTANT_UTF8)
@@ -643,28 +643,28 @@ class TestUtf8(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.utf8_none_in, None)
 
     def test_utf8_none_out(self):
-        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_none_out())
+        self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.utf8_none_out())
 
     def test_utf8_full_out(self):
-        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_full_out())
+        self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.utf8_full_out())
 
     def test_utf8_dangling_out(self):
         GIMarshallingTests.utf8_dangling_out()
 
     def test_utf8_none_inout(self):
-        self.assertEquals("", GIMarshallingTests.utf8_none_inout(CONSTANT_UTF8))
+        self.assertEqual("", GIMarshallingTests.utf8_none_inout(CONSTANT_UTF8))
 
     def test_utf8_full_inout(self):
-        self.assertEquals("", GIMarshallingTests.utf8_full_inout(CONSTANT_UTF8))
+        self.assertEqual("", GIMarshallingTests.utf8_full_inout(CONSTANT_UTF8))
 
 
 class TestArray(unittest.TestCase):
 
     def test_array_fixed_int_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_int_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.array_fixed_int_return())
 
     def test_array_fixed_short_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_short_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.array_fixed_short_return())
 
     def test_array_fixed_int_in(self):
         GIMarshallingTests.array_fixed_int_in(Sequence([-1, 0, 1, 2]))
@@ -678,13 +678,13 @@ class TestArray(unittest.TestCase):
         GIMarshallingTests.array_fixed_short_in(Sequence([-1, 0, 1, 2]))
 
     def test_array_fixed_out(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_out())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.array_fixed_out())
 
     def test_array_fixed_inout(self):
-        self.assertEquals([2, 1, 0, -1], GIMarshallingTests.array_fixed_inout([-1, 0, 1, 2]))
+        self.assertEqual([2, 1, 0, -1], GIMarshallingTests.array_fixed_inout([-1, 0, 1, 2]))
 
     def test_array_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.array_return())
 
     def test_array_in(self):
         GIMarshallingTests.array_in(Sequence([-1, 0, 1, 2]))
@@ -694,10 +694,10 @@ class TestArray(unittest.TestCase):
         GIMarshallingTests.array_uint8_in(_bytes("abcd"))
 
     def test_array_out(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_out())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.array_out())
 
     def test_array_inout(self):
-        self.assertEquals([-2, -1, 0, 1, 2], GIMarshallingTests.array_inout(Sequence([-1, 0, 1, 2])))
+        self.assertEqual([-2, -1, 0, 1, 2], GIMarshallingTests.array_inout(Sequence([-1, 0, 1, 2])))
 
     def test_method_array_in(self):
         object_ = GIMarshallingTests.Object()
@@ -705,15 +705,15 @@ class TestArray(unittest.TestCase):
 
     def test_method_array_out(self):
         object_ = GIMarshallingTests.Object()
-        self.assertEquals([-1, 0, 1, 2], object_.method_array_out())
+        self.assertEqual([-1, 0, 1, 2], object_.method_array_out())
 
     def test_method_array_inout(self):
         object_ = GIMarshallingTests.Object()
-        self.assertEquals([-2, -1, 0, 1, 2], object_.method_array_inout(Sequence([-1, 0, 1, 2])))
+        self.assertEqual([-2, -1, 0, 1, 2], object_.method_array_inout(Sequence([-1, 0, 1, 2])))
 
     def test_method_array_return(self):
         object_ = GIMarshallingTests.Object()
-        self.assertEquals([-1, 0, 1, 2], object_.method_array_return())
+        self.assertEqual([-1, 0, 1, 2], object_.method_array_return())
 
     def test_array_enum_in(self):
         GIMarshallingTests.array_enum_in([GIMarshallingTests.Enum.VALUE1,
@@ -750,40 +750,40 @@ class TestArray(unittest.TestCase):
     def test_array_fixed_out_struct(self):
         struct1, struct2 = GIMarshallingTests.array_fixed_out_struct()
 
-        self.assertEquals(7, struct1.long_)
-        self.assertEquals(6, struct1.int8)
-        self.assertEquals(6, struct2.long_)
-        self.assertEquals(7, struct2.int8)
+        self.assertEqual(7, struct1.long_)
+        self.assertEqual(6, struct1.int8)
+        self.assertEqual(6, struct2.long_)
+        self.assertEqual(7, struct2.int8)
 
     def test_array_zero_terminated_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_return())
 
     def test_array_zero_terminated_return_null(self):
-        self.assertEquals([], GIMarshallingTests.array_zero_terminated_return_null())
+        self.assertEqual([], GIMarshallingTests.array_zero_terminated_return_null())
 
     def test_array_zero_terminated_in(self):
         GIMarshallingTests.array_zero_terminated_in(Sequence(['0', '1', '2']))
 
     def test_array_zero_terminated_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_out())
 
     def test_array_zero_terminated_inout(self):
-        self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.array_zero_terminated_inout(['0', '1', '2']))
+        self.assertEqual(['-1', '0', '1', '2'], GIMarshallingTests.array_zero_terminated_inout(['0', '1', '2']))
 
 
 class TestGStrv(unittest.TestCase):
 
     def test_gstrv_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gstrv_return())
 
     def test_gstrv_in(self):
         GIMarshallingTests.gstrv_in(Sequence(['0', '1', '2']))
 
     def test_gstrv_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gstrv_out())
 
     def test_gstrv_inout(self):
-        self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
+        self.assertEqual(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
 
 
 class TestArrayGVariant(unittest.TestCase):
@@ -791,36 +791,36 @@ class TestArrayGVariant(unittest.TestCase):
     def test_array_gvariant_none_in(self):
         v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
         returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
-        self.assertEquals([27, "Hello"], returned)
+        self.assertEqual([27, "Hello"], returned)
 
     def test_array_gvariant_container_in(self):
         v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
         returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
-        self.assertEquals([27, "Hello"], returned)
+        self.assertEqual([27, "Hello"], returned)
 
     def test_array_gvariant_full_in(self):
         v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
         returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
-        self.assertEquals([27, "Hello"], returned)
+        self.assertEqual([27, "Hello"], returned)
 
     def test_bytearray_gvariant(self):
         v = GLib.Variant.new_bytestring(b"foo")
-        self.assertEquals(v.get_bytestring(), b"foo")
+        self.assertEqual(v.get_bytestring(), b"foo")
 
 
 class TestGArray(unittest.TestCase):
 
     def test_garray_int_none_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.garray_int_none_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.garray_int_none_return())
 
     def test_garray_utf8_none_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_return())
 
     def test_garray_utf8_container_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_return())
 
     def test_garray_utf8_full_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_return())
 
     def test_garray_int_none_in(self):
         GIMarshallingTests.garray_int_none_in(Sequence([-1, 0, 1, 2]))
@@ -834,70 +834,70 @@ class TestGArray(unittest.TestCase):
         GIMarshallingTests.garray_utf8_none_in(Sequence(['0', '1', '2']))
 
     def test_garray_utf8_none_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_out())
 
     def test_garray_utf8_container_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_out())
 
     def test_garray_utf8_full_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_out())
 
     def test_garray_utf8_none_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_none_inout(Sequence(('0', '1', '2'))))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_none_inout(Sequence(('0', '1', '2'))))
 
     def test_garray_utf8_container_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_container_inout(['0', '1', '2']))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_container_inout(['0', '1', '2']))
 
     def test_garray_utf8_full_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_full_inout(['0', '1', '2']))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_full_inout(['0', '1', '2']))
 
 
 class TestGPtrArray(unittest.TestCase):
 
     def test_gptrarray_utf8_none_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_return())
 
     def test_gptrarray_utf8_container_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_return())
 
     def test_gptrarray_utf8_full_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_return())
 
     def test_gptrarray_utf8_none_in(self):
         GIMarshallingTests.gptrarray_utf8_none_in(Sequence(['0', '1', '2']))
 
     def test_gptrarray_utf8_none_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_out())
 
     def test_gptrarray_utf8_container_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_out())
 
     def test_gptrarray_utf8_full_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_out())
 
     def test_gptrarray_utf8_none_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_none_inout(Sequence(('0', '1', '2'))))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_none_inout(Sequence(('0', '1', '2'))))
 
     def test_gptrarray_utf8_container_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_container_inout(['0', '1', '2']))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_container_inout(['0', '1', '2']))
 
     def test_gptrarray_utf8_full_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_full_inout(['0', '1', '2']))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_full_inout(['0', '1', '2']))
 
 
 class TestGList(unittest.TestCase):
 
     def test_glist_int_none_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.glist_int_none_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.glist_int_none_return())
 
     def test_glist_utf8_none_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_return())
 
     def test_glist_utf8_container_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_return())
 
     def test_glist_utf8_full_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_return())
 
     def test_glist_int_none_in(self):
         GIMarshallingTests.glist_int_none_in(Sequence((-1, 0, 1, 2)))
@@ -911,37 +911,37 @@ class TestGList(unittest.TestCase):
         GIMarshallingTests.glist_utf8_none_in(Sequence(('0', '1', '2')))
 
     def test_glist_utf8_none_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_out())
 
     def test_glist_utf8_container_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_out())
 
     def test_glist_utf8_full_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_out())
 
     def test_glist_utf8_none_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_none_inout(Sequence(('0', '1', '2'))))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_none_inout(Sequence(('0', '1', '2'))))
 
     def test_glist_utf8_container_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_container_inout(('0', '1', '2')))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_container_inout(('0', '1', '2')))
 
     def test_glist_utf8_full_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_full_inout(('0', '1', '2')))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_full_inout(('0', '1', '2')))
 
 
 class TestGSList(unittest.TestCase):
 
     def test_gslist_int_none_return(self):
-        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.gslist_int_none_return())
+        self.assertEqual([-1, 0, 1, 2], GIMarshallingTests.gslist_int_none_return())
 
     def test_gslist_utf8_none_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_return())
 
     def test_gslist_utf8_container_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_return())
 
     def test_gslist_utf8_full_return(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_return())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_return())
 
     def test_gslist_int_none_in(self):
         GIMarshallingTests.gslist_int_none_in(Sequence((-1, 0, 1, 2)))
@@ -955,37 +955,37 @@ class TestGSList(unittest.TestCase):
         GIMarshallingTests.gslist_utf8_none_in(Sequence(('0', '1', '2')))
 
     def test_gslist_utf8_none_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_out())
 
     def test_gslist_utf8_container_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_out())
 
     def test_gslist_utf8_full_out(self):
-        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_out())
+        self.assertEqual(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_out())
 
     def test_gslist_utf8_none_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_none_inout(Sequence(('0', '1', '2'))))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_none_inout(Sequence(('0', '1', '2'))))
 
     def test_gslist_utf8_container_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_container_inout(('0', '1', '2')))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_container_inout(('0', '1', '2')))
 
     def test_gslist_utf8_full_inout(self):
-        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_full_inout(('0', '1', '2')))
+        self.assertEqual(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_full_inout(('0', '1', '2')))
 
 
 class TestGHashTable(unittest.TestCase):
 
     def test_ghashtable_int_none_return(self):
-        self.assertEquals({-1: 1, 0: 0, 1: -1, 2: -2}, GIMarshallingTests.ghashtable_int_none_return())
+        self.assertEqual({-1: 1, 0: 0, 1: -1, 2: -2}, GIMarshallingTests.ghashtable_int_none_return())
 
     def test_ghashtable_int_none_return2(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_return())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_return())
 
     def test_ghashtable_int_container_return(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_return())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_return())
 
     def test_ghashtable_int_full_return(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_return())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_return())
 
     def test_ghashtable_int_none_in(self):
         GIMarshallingTests.ghashtable_int_none_in({-1: 1, 0: 0, 1: -1, 2: -2})
@@ -1000,31 +1000,31 @@ class TestGHashTable(unittest.TestCase):
         GIMarshallingTests.ghashtable_utf8_none_in({'-1': '1', '0': '0', '1': '-1', '2': '-2'})
 
     def test_ghashtable_utf8_none_out(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_out())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_out())
 
     def test_ghashtable_utf8_container_out(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_out())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_out())
 
     def test_ghashtable_utf8_full_out(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_out())
+        self.assertEqual({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_out())
 
     def test_ghashtable_utf8_none_inout(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+        self.assertEqual({'-1': '1', '0': '0', '1': '1'},
             GIMarshallingTests.ghashtable_utf8_none_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
 
     def test_ghashtable_utf8_container_inout(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+        self.assertEqual({'-1': '1', '0': '0', '1': '1'},
             GIMarshallingTests.ghashtable_utf8_container_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
 
     def test_ghashtable_utf8_full_inout(self):
-        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+        self.assertEqual({'-1': '1', '0': '0', '1': '1'},
             GIMarshallingTests.ghashtable_utf8_full_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
 
 
 class TestGValue(unittest.TestCase):
 
     def test_gvalue_return(self):
-        self.assertEquals(42, GIMarshallingTests.gvalue_return())
+        self.assertEqual(42, GIMarshallingTests.gvalue_return())
 
     def test_gvalue_in(self):
         GIMarshallingTests.gvalue_in(42)
@@ -1034,14 +1034,14 @@ class TestGValue(unittest.TestCase):
         GIMarshallingTests.gvalue_in(value)
 
     def test_gvalue_out(self):
-        self.assertEquals(42, GIMarshallingTests.gvalue_out())
+        self.assertEqual(42, GIMarshallingTests.gvalue_out())
 
     def test_gvalue_inout(self):
-        self.assertEquals('42', GIMarshallingTests.gvalue_inout(42))
+        self.assertEqual('42', GIMarshallingTests.gvalue_inout(42))
         value = GObject.Value()
         value.init(GObject.TYPE_INT)
         value.set_int(42)
-        self.assertEquals('42', GIMarshallingTests.gvalue_inout(value))
+        self.assertEqual('42', GIMarshallingTests.gvalue_inout(value))
 
     def test_gvalue_flat_array_in(self):
         # the function already asserts the correct values
@@ -1067,7 +1067,7 @@ class TestGClosure(unittest.TestCase):
 
 class TestPointer(unittest.TestCase):
     def test_pointer_in_return(self):
-        self.assertEquals(GIMarshallingTests.pointer_in_return(42), 42)
+        self.assertEqual(GIMarshallingTests.pointer_in_return(42), 42)
 
 
 class TestEnum(unittest.TestCase):
@@ -1102,7 +1102,7 @@ class TestEnum(unittest.TestCase):
         self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE1, GIMarshallingTests.Enum))
         self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE2, GIMarshallingTests.Enum))
         self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE3, GIMarshallingTests.Enum))
-        self.assertEquals(42, GIMarshallingTests.Enum.VALUE3)
+        self.assertEqual(42, GIMarshallingTests.Enum.VALUE3)
 
     def test_value_nick_and_name(self):
         self.assertEqual(GIMarshallingTests.Enum.VALUE1.value_nick, 'value1')
@@ -1123,12 +1123,12 @@ class TestEnum(unittest.TestCase):
     def test_enum_out(self):
         enum = GIMarshallingTests.enum_out()
         self.assertTrue(isinstance(enum, GIMarshallingTests.Enum))
-        self.assertEquals(enum, GIMarshallingTests.Enum.VALUE3)
+        self.assertEqual(enum, GIMarshallingTests.Enum.VALUE3)
 
     def test_enum_inout(self):
         enum = GIMarshallingTests.enum_inout(GIMarshallingTests.Enum.VALUE3)
         self.assertTrue(isinstance(enum, GIMarshallingTests.Enum))
-        self.assertEquals(enum, GIMarshallingTests.Enum.VALUE1)
+        self.assertEqual(enum, GIMarshallingTests.Enum.VALUE1)
 
     def test_enum_second(self):
         # check for the bug where different non-gtype enums share the same class
@@ -1148,7 +1148,7 @@ class TestGEnum(unittest.TestCase):
         self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE1, GIMarshallingTests.GEnum))
         self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE2, GIMarshallingTests.GEnum))
         self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE3, GIMarshallingTests.GEnum))
-        self.assertEquals(42, GIMarshallingTests.GEnum.VALUE3)
+        self.assertEqual(42, GIMarshallingTests.GEnum.VALUE3)
 
     def test_value_nick_and_name(self):
         self.assertEqual(GIMarshallingTests.GEnum.VALUE1.value_nick, 'value1')
@@ -1169,12 +1169,12 @@ class TestGEnum(unittest.TestCase):
     def test_genum_out(self):
         genum = GIMarshallingTests.genum_out()
         self.assertTrue(isinstance(genum, GIMarshallingTests.GEnum))
-        self.assertEquals(genum, GIMarshallingTests.GEnum.VALUE3)
+        self.assertEqual(genum, GIMarshallingTests.GEnum.VALUE3)
 
     def test_genum_inout(self):
         genum = GIMarshallingTests.genum_inout(GIMarshallingTests.GEnum.VALUE3)
         self.assertTrue(isinstance(genum, GIMarshallingTests.GEnum))
-        self.assertEquals(genum, GIMarshallingTests.GEnum.VALUE1)
+        self.assertEqual(genum, GIMarshallingTests.GEnum.VALUE1)
 
 
 class TestGFlags(unittest.TestCase):
@@ -1187,7 +1187,7 @@ class TestGFlags(unittest.TestCase):
         # __or__() operation should still return an instance, not an int.
         self.assertTrue(isinstance(GIMarshallingTests.Flags.VALUE1 | GIMarshallingTests.Flags.VALUE2,
                                    GIMarshallingTests.Flags))
-        self.assertEquals(1 << 1, GIMarshallingTests.Flags.VALUE2)
+        self.assertEqual(1 << 1, GIMarshallingTests.Flags.VALUE2)
 
     def test_value_nick_and_name(self):
         self.assertEqual(GIMarshallingTests.Flags.VALUE1.first_value_nick, 'value1')
@@ -1210,12 +1210,12 @@ class TestGFlags(unittest.TestCase):
     def test_flags_out(self):
         flags = GIMarshallingTests.flags_out()
         self.assertTrue(isinstance(flags, GIMarshallingTests.Flags))
-        self.assertEquals(flags, GIMarshallingTests.Flags.VALUE2)
+        self.assertEqual(flags, GIMarshallingTests.Flags.VALUE2)
 
     def test_flags_inout(self):
         flags = GIMarshallingTests.flags_inout(GIMarshallingTests.Flags.VALUE2)
         self.assertTrue(isinstance(flags, GIMarshallingTests.Flags))
-        self.assertEquals(flags, GIMarshallingTests.Flags.VALUE1)
+        self.assertEqual(flags, GIMarshallingTests.Flags.VALUE1)
 
 
 class TestNoTypeFlags(unittest.TestCase):
@@ -1228,7 +1228,7 @@ class TestNoTypeFlags(unittest.TestCase):
         # __or__() operation should still return an instance, not an int.
         self.assertTrue(isinstance(GIMarshallingTests.NoTypeFlags.VALUE1 | GIMarshallingTests.NoTypeFlags.VALUE2,
                                    GIMarshallingTests.NoTypeFlags))
-        self.assertEquals(1 << 1, GIMarshallingTests.NoTypeFlags.VALUE2)
+        self.assertEqual(1 << 1, GIMarshallingTests.NoTypeFlags.VALUE2)
 
     def test_value_nick_and_name(self):
         self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE1.first_value_nick, 'value1')
@@ -1250,12 +1250,12 @@ class TestNoTypeFlags(unittest.TestCase):
     def test_flags_out(self):
         flags = GIMarshallingTests.no_type_flags_out()
         self.assertTrue(isinstance(flags, GIMarshallingTests.NoTypeFlags))
-        self.assertEquals(flags, GIMarshallingTests.NoTypeFlags.VALUE2)
+        self.assertEqual(flags, GIMarshallingTests.NoTypeFlags.VALUE2)
 
     def test_flags_inout(self):
         flags = GIMarshallingTests.no_type_flags_inout(GIMarshallingTests.NoTypeFlags.VALUE2)
         self.assertTrue(isinstance(flags, GIMarshallingTests.NoTypeFlags))
-        self.assertEquals(flags, GIMarshallingTests.NoTypeFlags.VALUE1)
+        self.assertEqual(flags, GIMarshallingTests.NoTypeFlags.VALUE1)
 
 
 class TestStructure(unittest.TestCase):
@@ -1266,14 +1266,14 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.SimpleStruct()
         self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
 
-        self.assertEquals(0, struct.long_)
-        self.assertEquals(0, struct.int8)
+        self.assertEqual(0, struct.long_)
+        self.assertEqual(0, struct.int8)
 
         struct.long_ = 6
         struct.int8 = 7
 
-        self.assertEquals(6, struct.long_)
-        self.assertEquals(7, struct.int8)
+        self.assertEqual(6, struct.long_)
+        self.assertEqual(7, struct.int8)
 
         del struct
 
@@ -1283,20 +1283,20 @@ class TestStructure(unittest.TestCase):
         self.assertTrue(isinstance(struct.simple_struct, GIMarshallingTests.SimpleStruct))
 
         struct.simple_struct.long_ = 42
-        self.assertEquals(42, struct.simple_struct.long_)
+        self.assertEqual(42, struct.simple_struct.long_)
 
         del struct
 
     def test_not_simple_struct(self):
         struct = GIMarshallingTests.NotSimpleStruct()
-        self.assertEquals(None, struct.pointer)
+        self.assertEqual(None, struct.pointer)
 
     def test_simple_struct_return(self):
         struct = GIMarshallingTests.simple_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
-        self.assertEquals(6, struct.long_)
-        self.assertEquals(7, struct.int8)
+        self.assertEqual(6, struct.long_)
+        self.assertEqual(7, struct.int8)
 
         del struct
 
@@ -1340,7 +1340,7 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.pointer_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.PointerStruct))
-        self.assertEquals(42, struct.long_)
+        self.assertEqual(42, struct.long_)
 
         del struct
 
@@ -1358,8 +1358,8 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.BoxedStruct()
         self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
 
-        self.assertEquals(0, struct.long_)
-        self.assertEquals([], struct.g_strv)
+        self.assertEqual(0, struct.long_)
+        self.assertEqual([], struct.g_strv)
 
         del struct
 
@@ -1382,8 +1382,8 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.boxed_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
-        self.assertEquals(42, struct.long_)
-        self.assertEquals(['0', '1', '2'], struct.g_strv)
+        self.assertEqual(42, struct.long_)
+        self.assertEqual(['0', '1', '2'], struct.g_strv)
 
         del struct
 
@@ -1399,7 +1399,7 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.boxed_struct_out()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
-        self.assertEquals(42, struct.long_)
+        self.assertEqual(42, struct.long_)
 
         del struct
 
@@ -1410,7 +1410,7 @@ class TestStructure(unittest.TestCase):
         out_struct = GIMarshallingTests.boxed_struct_inout(in_struct)
 
         self.assertTrue(isinstance(out_struct, GIMarshallingTests.BoxedStruct))
-        self.assertEquals(0, out_struct.long_)
+        self.assertEqual(0, out_struct.long_)
 
         del in_struct
         del out_struct
@@ -1430,7 +1430,7 @@ class TestStructure(unittest.TestCase):
         union = GIMarshallingTests.union_returnv()
 
         self.assertTrue(isinstance(union, GIMarshallingTests.Union))
-        self.assertEquals(42, union.long_)
+        self.assertEqual(42, union.long_)
 
         del union
 
@@ -1460,19 +1460,19 @@ class TestGObject(unittest.TestCase):
 
         object_ = GIMarshallingTests.Object()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 1)
 
     def test_object_new(self):
         object_ = GIMarshallingTests.Object.new(42)
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 1)
 
     def test_object_int(self):
         object_ = GIMarshallingTests.Object(int=42)
-        self.assertEquals(object_.int_, 42)
+        self.assertEqual(object_.int_, 42)
 # FIXME: Don't work yet.
 #        object_.int_ = 0
-#        self.assertEquals(object_.int_, 0)
+#        self.assertEqual(object_.int_, 0)
 
     def test_object_static_method(self):
         GIMarshallingTests.Object.static_method()
@@ -1511,25 +1511,25 @@ class TestGObject(unittest.TestCase):
 
     def test_sub_object_int(self):
         object_ = GIMarshallingTests.SubObject()
-        self.assertEquals(object_.int_, 0)
+        self.assertEqual(object_.int_, 0)
 # FIXME: Don't work yet.
 #        object_.int_ = 42
-#        self.assertEquals(object_.int_, 42)
+#        self.assertEqual(object_.int_, 42)
 
     def test_object_none_return(self):
         object_ = GIMarshallingTests.Object.none_return()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 2)
+        self.assertEqual(object_.__grefcount__, 2)
 
     def test_object_full_return(self):
         object_ = GIMarshallingTests.Object.full_return()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 1)
 
     def test_object_none_in(self):
         object_ = GIMarshallingTests.Object(int=42)
         GIMarshallingTests.Object.none_in(object_)
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 1)
 
         object_ = GIMarshallingTests.SubObject(int=42)
         GIMarshallingTests.Object.none_in(object_)
@@ -1542,7 +1542,7 @@ class TestGObject(unittest.TestCase):
     def test_object_none_out(self):
         object_ = GIMarshallingTests.Object.none_out()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 2)
+        self.assertEqual(object_.__grefcount__, 2)
 
         new_object = GIMarshallingTests.Object.none_out()
         self.assertTrue(new_object is object_)
@@ -1550,7 +1550,7 @@ class TestGObject(unittest.TestCase):
     def test_object_full_out(self):
         object_ = GIMarshallingTests.Object.full_out()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 1)
 
     def test_object_none_inout(self):
         object_ = GIMarshallingTests.Object(int=42)
@@ -1560,8 +1560,8 @@ class TestGObject(unittest.TestCase):
 
         self.assertFalse(object_ is new_object)
 
-        self.assertEquals(object_.__grefcount__, 1)
-        self.assertEquals(new_object.__grefcount__, 2)
+        self.assertEqual(object_.__grefcount__, 1)
+        self.assertEqual(new_object.__grefcount__, 2)
 
         new_new_object = GIMarshallingTests.Object.none_inout(object_)
         self.assertTrue(new_new_object is new_object)
@@ -1576,15 +1576,15 @@ class TestGObject(unittest.TestCase):
 
         self.assertFalse(object_ is new_object)
 
-        self.assertEquals(object_.__grefcount__, 2)
-        self.assertEquals(new_object.__grefcount__, 1)
+        self.assertEqual(object_.__grefcount__, 2)
+        self.assertEqual(new_object.__grefcount__, 1)
 
 # FIXME: Doesn't actually return the same object.
 #    def test_object_inout_same(self):
 #        object_ = GIMarshallingTests.Object()
 #        new_object = GIMarshallingTests.object_full_inout(object_)
 #        self.assertTrue(object_ is new_object)
-#        self.assertEquals(object_.__grefcount__, 1)
+#        self.assertEqual(object_.__grefcount__, 1)
 
 
 class TestPythonGObject(unittest.TestCase):
@@ -1645,16 +1645,16 @@ class TestPythonGObject(unittest.TestCase):
     def test_subobject_parent_vfunc(self):
         object_ = self.SubObject(int=81)
         object_.method_with_default_implementation(87)
-        self.assertEquals(object_.val, 87)
+        self.assertEqual(object_.val, 87)
 
     def test_dynamic_module(self):
         from gi.module import DynamicGObjectModule
         self.assertTrue(isinstance(GObject, DynamicGObjectModule))
         # compare the same enum from both the pygobject attrs and gi GObject attrs
-        self.assertEquals(GObject.SIGNAL_ACTION, GObject.SignalFlags.ACTION)
+        self.assertEqual(GObject.SIGNAL_ACTION, GObject.SignalFlags.ACTION)
         # compare a static gobject attr with a dynamic GObject attr
         import gi._gobject
-        self.assertEquals(GObject.GObject, gi._gobject.GObject)
+        self.assertEqual(GObject.GObject, gi._gobject.GObject)
 
     def test_subobject_non_vfunc_do_method(self):
         class PythonObjectWithNonVFuncDoMethod:
@@ -1667,7 +1667,7 @@ class TestPythonGObject(unittest.TestCase):
                 return 13 + value
 
         object_ = ObjectOverrideNonVFuncDoMethod()
-        self.assertEquals(18, object_.do_not_a_vfunc())
+        self.assertEqual(18, object_.do_not_a_vfunc())
 
     def test_native_function_not_set_in_subclass_dict(self):
         # Previously, GI was setting virtual functions on the class as well
@@ -1713,10 +1713,10 @@ class TestPythonGObject(unittest.TestCase):
 class TestMultiOutputArgs(unittest.TestCase):
 
     def test_int_out_out(self):
-        self.assertEquals((6, 7), GIMarshallingTests.int_out_out())
+        self.assertEqual((6, 7), GIMarshallingTests.int_out_out())
 
     def test_int_return_out(self):
-        self.assertEquals((6, 7), GIMarshallingTests.int_return_out())
+        self.assertEqual((6, 7), GIMarshallingTests.int_return_out())
 
 
 class TestGErrorException(unittest.TestCase):
@@ -1726,9 +1726,9 @@ class TestGErrorException(unittest.TestCase):
             GIMarshallingTests.gerror()
         except Exception:
             etype, e = sys.exc_info()[:2]
-            self.assertEquals(e.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
-            self.assertEquals(e.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
-            self.assertEquals(e.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+            self.assertEqual(e.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
+            self.assertEqual(e.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
+            self.assertEqual(e.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
 
 
 # Interface
@@ -1749,7 +1749,7 @@ class TestInterfaces(unittest.TestCase):
 
     def test_wrapper(self):
         self.assertTrue(issubclass(GIMarshallingTests.Interface, GObject.GInterface))
-        self.assertEquals(GIMarshallingTests.Interface.__gtype__.name, 'GIMarshallingTestsInterface')
+        self.assertEqual(GIMarshallingTests.Interface.__gtype__.name, 'GIMarshallingTestsInterface')
         self.assertRaises(NotImplementedError, GIMarshallingTests.Interface)
 
     def test_implementation(self):
@@ -1758,7 +1758,7 @@ class TestInterfaces(unittest.TestCase):
 
     def test_int8_int(self):
         GIMarshallingTests.test_interface_test_int8_in(self.instance, 42)
-        self.assertEquals(self.instance.val, 42)
+        self.assertEqual(self.instance.val, 42)
 
     def test_subclass(self):
         class TestInterfaceImplA(self.TestInterfaceImpl):
@@ -1769,7 +1769,7 @@ class TestInterfaces(unittest.TestCase):
 
         instance = TestInterfaceImplA()
         GIMarshallingTests.test_interface_test_int8_in(instance, 42)
-        self.assertEquals(instance.val, 42)
+        self.assertEqual(instance.val, 42)
 
     def test_mro(self):
         # there was a problem with Python bailing out because of
@@ -1803,7 +1803,7 @@ class TestInterfaceClash(unittest.TestCase):
 class TestOverrides(unittest.TestCase):
 
     def test_constant(self):
-        self.assertEquals(GIMarshallingTests.OVERRIDES_CONSTANT, 7)
+        self.assertEqual(GIMarshallingTests.OVERRIDES_CONSTANT, 7)
 
     def test_struct(self):
         # Test that the constructor has been overridden.
@@ -1812,7 +1812,7 @@ class TestOverrides(unittest.TestCase):
         self.assertTrue(isinstance(struct, GIMarshallingTests.OverridesStruct))
 
         # Test that the method has been overridden.
-        self.assertEquals(6, struct.method())
+        self.assertEqual(6, struct.method())
 
         del struct
 
@@ -1835,7 +1835,7 @@ class TestOverrides(unittest.TestCase):
         self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
 
         # Test that the method has been overridden.
-        self.assertEquals(6, object_.method())
+        self.assertEqual(6, object_.method())
 
         # Test that the overrides wrapper has been registered.
         object_ = GIMarshallingTests.OverridesObject.returnv()
@@ -1843,8 +1843,8 @@ class TestOverrides(unittest.TestCase):
         self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
 
     def test_module_name(self):
-        self.assertEquals(GIMarshallingTests.OverridesStruct.__module__, 'gi.overrides.GIMarshallingTests')
-        self.assertEquals(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
+        self.assertEqual(GIMarshallingTests.OverridesStruct.__module__, 'gi.overrides.GIMarshallingTests')
+        self.assertEqual(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
 
 
 class TestDir(unittest.TestCase):
@@ -1888,10 +1888,10 @@ class TestGErrorOut(unittest.TestCase):
         error, debug = GIMarshallingTests.gerror_out()
 
         self.assertIsInstance(error, GObject.GError)
-        self.assertEquals(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
-        self.assertEquals(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
-        self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
-        self.assertEquals(debug, GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE)
+        self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
+        self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
+        self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+        self.assertEqual(debug, GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE)
 
 
 class TestGErrorOutTransferNone(unittest.TestCase):
@@ -1900,10 +1900,10 @@ class TestGErrorOutTransferNone(unittest.TestCase):
         error, debug = GIMarshallingTests.gerror_out_transfer_none()
 
         self.assertIsInstance(error, GObject.GError)
-        self.assertEquals(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
-        self.assertEquals(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
-        self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
-        self.assertEquals(GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE, debug)
+        self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
+        self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
+        self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+        self.assertEqual(GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE, debug)
 
 
 class TestGErrorReturn(unittest.TestCase):
@@ -1912,9 +1912,9 @@ class TestGErrorReturn(unittest.TestCase):
         error = GIMarshallingTests.gerror_return()
 
         self.assertIsInstance(error, GObject.GError)
-        self.assertEquals(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
-        self.assertEquals(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
-        self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+        self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
+        self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
+        self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
 
 
 class TestKeywordArgs(unittest.TestCase):
@@ -1922,13 +1922,13 @@ class TestKeywordArgs(unittest.TestCase):
     def test_calling(self):
         kw_func = GIMarshallingTests.int_three_in_three_out
 
-        self.assertEquals(kw_func(1, 2, 3), (1, 2, 3))
-        self.assertEquals(kw_func(**{'a': 4, 'b': 5, 'c': 6}), (4, 5, 6))
-        self.assertEquals(kw_func(1, **{'b': 7, 'c': 8}), (1, 7, 8))
-        self.assertEquals(kw_func(1, 7, **{'c': 8}), (1, 7, 8))
-        self.assertEquals(kw_func(1, c=8, **{'b': 7}), (1, 7, 8))
-        self.assertEquals(kw_func(2, c=4, b=3), (2, 3, 4))
-        self.assertEquals(kw_func(a=2, c=4, b=3), (2, 3, 4))
+        self.assertEqual(kw_func(1, 2, 3), (1, 2, 3))
+        self.assertEqual(kw_func(**{'a': 4, 'b': 5, 'c': 6}), (4, 5, 6))
+        self.assertEqual(kw_func(1, **{'b': 7, 'c': 8}), (1, 7, 8))
+        self.assertEqual(kw_func(1, 7, **{'c': 8}), (1, 7, 8))
+        self.assertEqual(kw_func(1, c=8, **{'b': 7}), (1, 7, 8))
+        self.assertEqual(kw_func(2, c=4, b=3), (2, 3, 4))
+        self.assertEqual(kw_func(a=2, c=4, b=3), (2, 3, 4))
 
     def assertRaisesMessage(self, exception, message, func, *args, **kwargs):
         try:
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
index ecd67cf..5a4284e 100644
--- a/tests/test_gobject.py
+++ b/tests/test_gobject.py
@@ -11,41 +11,41 @@ class TestGObjectAPI(unittest.TestCase):
     def testGObjectModule(self):
         obj = GObject.GObject()
 
-        self.assertEquals(obj.__module__,
+        self.assertEqual(obj.__module__,
                           'gi._gobject._gobject')
 
 
 class TestReferenceCounting(unittest.TestCase):
     def testRegularObject(self):
         obj = GObject.GObject()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
         obj = GObject.new(GObject.GObject)
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testFloating(self):
         obj = testhelper.Floating()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
         obj = GObject.new(testhelper.Floating)
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testOwnedByLibrary(self):
         # Upon creation, the refcount of the object should be 2:
         # - someone already has a reference on the new object.
         # - the python wrapper should hold its own reference.
         obj = testhelper.OwnedByLibrary()
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We ask the library to release its reference, so the only
         # remaining ref should be our wrapper's. Once the wrapper
         # will run out of scope, the object will get finalized.
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testOwnedByLibraryOutOfScope(self):
         obj = testhelper.OwnedByLibrary()
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We are manually taking the object out of scope. This means
         # that our wrapper has been freed, and its reference dropped. We
@@ -56,27 +56,27 @@ class TestReferenceCounting(unittest.TestCase):
         # When we get the object back from the lib, the wrapper is
         # re-created, so our refcount will be 2 once again.
         obj = testhelper.owned_by_library_get_instance_list()[0]
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testOwnedByLibraryUsingGObjectNew(self):
         # Upon creation, the refcount of the object should be 2:
         # - someone already has a reference on the new object.
         # - the python wrapper should hold its own reference.
         obj = GObject.new(testhelper.OwnedByLibrary)
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We ask the library to release its reference, so the only
         # remaining ref should be our wrapper's. Once the wrapper
         # will run out of scope, the object will get finalized.
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testOwnedByLibraryOutOfScopeUsingGobjectNew(self):
         obj = GObject.new(testhelper.OwnedByLibrary)
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We are manually taking the object out of scope. This means
         # that our wrapper has been freed, and its reference dropped. We
@@ -87,27 +87,27 @@ class TestReferenceCounting(unittest.TestCase):
         # When we get the object back from the lib, the wrapper is
         # re-created, so our refcount will be 2 once again.
         obj = testhelper.owned_by_library_get_instance_list()[0]
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testFloatingAndSunk(self):
         # Upon creation, the refcount of the object should be 2:
         # - someone already has a reference on the new object.
         # - the python wrapper should hold its own reference.
         obj = testhelper.FloatingAndSunk()
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We ask the library to release its reference, so the only
         # remaining ref should be our wrapper's. Once the wrapper
         # will run out of scope, the object will get finalized.
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testFloatingAndSunkOutOfScope(self):
         obj = testhelper.FloatingAndSunk()
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We are manually taking the object out of scope. This means
         # that our wrapper has been freed, and its reference dropped. We
@@ -118,27 +118,27 @@ class TestReferenceCounting(unittest.TestCase):
         # When we get the object back from the lib, the wrapper is
         # re-created, so our refcount will be 2 once again.
         obj = testhelper.floating_and_sunk_get_instance_list()[0]
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testFloatingAndSunkUsingGObjectNew(self):
         # Upon creation, the refcount of the object should be 2:
         # - someone already has a reference on the new object.
         # - the python wrapper should hold its own reference.
         obj = GObject.new(testhelper.FloatingAndSunk)
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We ask the library to release its reference, so the only
         # remaining ref should be our wrapper's. Once the wrapper
         # will run out of scope, the object will get finalized.
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testFloatingAndSunkOutOfScopeUsingGObjectNew(self):
         obj = GObject.new(testhelper.FloatingAndSunk)
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         # We are manually taking the object out of scope. This means
         # that our wrapper has been freed, and its reference dropped. We
@@ -149,10 +149,10 @@ class TestReferenceCounting(unittest.TestCase):
         # When we get the object back from the lib, the wrapper is
         # re-created, so our refcount will be 2 once again.
         obj = testhelper.floating_and_sunk_get_instance_list()[0]
-        self.assertEquals(obj.__grefcount__, 2)
+        self.assertEqual(obj.__grefcount__, 2)
 
         obj.release()
-        self.assertEquals(obj.__grefcount__, 1)
+        self.assertEqual(obj.__grefcount__, 1)
 
     def testUninitializedObject(self):
         class Obj(GObject.GObject):
@@ -177,19 +177,19 @@ class TestPythonReferenceCounting(unittest.TestCase):
 
     def testNewInstanceHasTwoRefs(self):
         obj = GObject.GObject()
-        self.assertEquals(sys.getrefcount(obj), 2)
+        self.assertEqual(sys.getrefcount(obj), 2)
 
     def testNewInstanceHasTwoRefsUsingGObjectNew(self):
         obj = GObject.new(GObject.GObject)
-        self.assertEquals(sys.getrefcount(obj), 2)
+        self.assertEqual(sys.getrefcount(obj), 2)
 
     def testNewSubclassInstanceHasTwoRefs(self):
         obj = A()
-        self.assertEquals(sys.getrefcount(obj), 2)
+        self.assertEqual(sys.getrefcount(obj), 2)
 
     def testNewSubclassInstanceHasTwoRefsUsingGObjectNew(self):
         obj = GObject.new(A)
-        self.assertEquals(sys.getrefcount(obj), 2)
+        self.assertEqual(sys.getrefcount(obj), 2)
 
 
 class TestContextManagers(unittest.TestCase):
diff --git a/tests/test_option.py b/tests/test_option.py
index 862d4ed..7f63173 100644
--- a/tests/test_option.py
+++ b/tests/test_option.py
@@ -64,16 +64,16 @@ class TestOption(unittest.TestCase):
 
         options, args = self.parser.parse_args(
             ["test_option.py", "foo"])
-        self.assertEquals(args, [])
+        self.assertEqual(args, [])
 
         options, args = self.parser.parse_args(
             ["test_option.py", "foo", "bar"])
-        self.assertEquals(args, [])
+        self.assertEqual(args, [])
 
     def testParseArgsDoubleDash(self):
         options, args = self.parser.parse_args(
             ["test_option.py", "--", "-xxx"])
-        #self.assertEquals(args, ["-xxx"])
+        #self.assertEqual(args, ["-xxx"])
 
     def testParseArgsGroup(self):
         group = self._create_group()
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 42f598f..1d27abd 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -39,15 +39,15 @@ class TestGLib(unittest.TestCase):
 
         variant = GLib.Variant('i', 42)
         self.assertTrue(isinstance(variant, GLib.Variant))
-        self.assertEquals(variant.get_int32(), 42)
+        self.assertEqual(variant.get_int32(), 42)
 
         variant = GLib.Variant('s', '')
         self.assertTrue(isinstance(variant, GLib.Variant))
-        self.assertEquals(variant.get_string(), '')
+        self.assertEqual(variant.get_string(), '')
 
         variant = GLib.Variant('s', 'hello')
         self.assertTrue(isinstance(variant, GLib.Variant))
-        self.assertEquals(variant.get_string(), 'hello')
+        self.assertEqual(variant.get_string(), 'hello')
 
         # boxed variant
         variant = GLib.Variant('v', GLib.Variant('i', 42))
@@ -55,34 +55,34 @@ class TestGLib(unittest.TestCase):
         self.assertTrue(isinstance(variant.get_variant(), GLib.Variant))
         self.assertEqual(variant.get_type_string(), 'v')
         self.assertEqual(variant.get_variant().get_type_string(), 'i')
-        self.assertEquals(variant.get_variant().get_int32(), 42)
+        self.assertEqual(variant.get_variant().get_int32(), 42)
 
         variant = GLib.Variant('v', GLib.Variant('v', GLib.Variant('i', 42)))
         self.assertEqual(variant.get_type_string(), 'v')
         self.assertEqual(variant.get_variant().get_type_string(), 'v')
         self.assertEqual(variant.get_variant().get_variant().get_type_string(), 'i')
-        self.assertEquals(variant.get_variant().get_variant().get_int32(), 42)
+        self.assertEqual(variant.get_variant().get_variant().get_int32(), 42)
 
         # tuples
 
         variant = GLib.Variant('()', ())
         self.assertEqual(variant.get_type_string(), '()')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         variant = GLib.Variant('(i)', (3,))
         self.assertEqual(variant.get_type_string(), '(i)')
         self.assertTrue(isinstance(variant, GLib.Variant))
-        self.assertEquals(variant.n_children(), 1)
+        self.assertEqual(variant.n_children(), 1)
         self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
-        self.assertEquals(variant.get_child_value(0).get_int32(), 3)
+        self.assertEqual(variant.get_child_value(0).get_int32(), 3)
 
         variant = GLib.Variant('(ss)', ('mec', 'mac'))
         self.assertEqual(variant.get_type_string(), '(ss)')
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
-        self.assertEquals(variant.get_child_value(0).get_string(), 'mec')
-        self.assertEquals(variant.get_child_value(1).get_string(), 'mac')
+        self.assertEqual(variant.get_child_value(0).get_string(), 'mec')
+        self.assertEqual(variant.get_child_value(1).get_string(), 'mac')
 
         # nested tuples
         variant = GLib.Variant('((si)(ub))', (('hello', -1), (42, True)))
@@ -94,7 +94,7 @@ class TestGLib(unittest.TestCase):
         variant = GLib.Variant('a{si}', {})
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertEqual(variant.get_type_string(), 'a{si}')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         variant = GLib.Variant('a{si}', {'': 1, 'key1': 2, 'key2': 3})
         self.assertEqual(variant.get_type_string(), 'a{si}')
@@ -108,7 +108,7 @@ class TestGLib(unittest.TestCase):
         variant = GLib.Variant('a{sa{si}}', {})
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertEqual(variant.get_type_string(), 'a{sa{si}}')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         d = {'': {'': 1, 'keyn1': 2},
              'key1': {'key11': 11, 'key12': 12}}
@@ -121,47 +121,47 @@ class TestGLib(unittest.TestCase):
 
         variant = GLib.Variant('ai', [])
         self.assertEqual(variant.get_type_string(), 'ai')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         variant = GLib.Variant('ai', [1, 2])
         self.assertEqual(variant.get_type_string(), 'ai')
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
-        self.assertEquals(variant.get_child_value(0).get_int32(), 1)
-        self.assertEquals(variant.get_child_value(1).get_int32(), 2)
+        self.assertEqual(variant.get_child_value(0).get_int32(), 1)
+        self.assertEqual(variant.get_child_value(1).get_int32(), 2)
 
         variant = GLib.Variant('as', [])
         self.assertEqual(variant.get_type_string(), 'as')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         variant = GLib.Variant('as', [''])
         self.assertEqual(variant.get_type_string(), 'as')
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
-        self.assertEquals(variant.get_child_value(0).get_string(), '')
+        self.assertEqual(variant.get_child_value(0).get_string(), '')
 
         variant = GLib.Variant('as', ['hello', 'world'])
         self.assertEqual(variant.get_type_string(), 'as')
         self.assertTrue(isinstance(variant, GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
         self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
-        self.assertEquals(variant.get_child_value(0).get_string(), 'hello')
-        self.assertEquals(variant.get_child_value(1).get_string(), 'world')
+        self.assertEqual(variant.get_child_value(0).get_string(), 'hello')
+        self.assertEqual(variant.get_child_value(1).get_string(), 'world')
 
         # nested arrays
         variant = GLib.Variant('aai', [])
         self.assertEqual(variant.get_type_string(), 'aai')
-        self.assertEquals(variant.n_children(), 0)
+        self.assertEqual(variant.n_children(), 0)
 
         variant = GLib.Variant('aai', [[]])
         self.assertEqual(variant.get_type_string(), 'aai')
-        self.assertEquals(variant.n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).n_children(), 0)
+        self.assertEqual(variant.n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).n_children(), 0)
 
         variant = GLib.Variant('aai', [[1, 2], [3, 4, 5]])
         self.assertEqual(variant.get_type_string(), 'aai')
-        self.assertEquals(variant.unpack(), [[1, 2], [3, 4, 5]])
+        self.assertEqual(variant.unpack(), [[1, 2], [3, 4, 5]])
 
         #
         # complex types
@@ -169,20 +169,20 @@ class TestGLib(unittest.TestCase):
 
         variant = GLib.Variant('(as)', ([],))
         self.assertEqual(variant.get_type_string(), '(as)')
-        self.assertEquals(variant.n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).n_children(), 0)
+        self.assertEqual(variant.n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).n_children(), 0)
 
         variant = GLib.Variant('(as)', ([''],))
         self.assertEqual(variant.get_type_string(), '(as)')
-        self.assertEquals(variant.n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).get_child_value(0).get_string(), '')
+        self.assertEqual(variant.n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).get_child_value(0).get_string(), '')
 
         variant = GLib.Variant('(as)', (['hello'],))
         self.assertEqual(variant.get_type_string(), '(as)')
-        self.assertEquals(variant.n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).n_children(), 1)
-        self.assertEquals(variant.get_child_value(0).get_child_value(0).get_string(), 'hello')
+        self.assertEqual(variant.n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).n_children(), 1)
+        self.assertEqual(variant.get_child_value(0).get_child_value(0).get_string(), 'hello')
 
         obj = {'a1': (1, True), 'a2': (2, False)}
         variant = GLib.Variant('a{s(ib)}', obj)
@@ -466,21 +466,21 @@ class TestPango(unittest.TestCase):
 
     def test_default_font_description(self):
         desc = Pango.FontDescription()
-        self.assertEquals(desc.get_variant(), Pango.Variant.NORMAL)
+        self.assertEqual(desc.get_variant(), Pango.Variant.NORMAL)
 
     def test_font_description(self):
         desc = Pango.FontDescription('monospace')
-        self.assertEquals(desc.get_family(), 'monospace')
-        self.assertEquals(desc.get_variant(), Pango.Variant.NORMAL)
+        self.assertEqual(desc.get_family(), 'monospace')
+        self.assertEqual(desc.get_variant(), Pango.Variant.NORMAL)
 
     def test_layout(self):
         self.assertRaises(TypeError, Pango.Layout)
         context = Pango.Context()
         layout = Pango.Layout(context)
-        self.assertEquals(layout.get_context(), context)
+        self.assertEqual(layout.get_context(), context)
 
         layout.set_markup("Foobar")
-        self.assertEquals(layout.get_text(), "Foobar")
+        self.assertEqual(layout.get_text(), "Foobar")
 
 
 class TestGdk(unittest.TestCase):
@@ -491,37 +491,37 @@ class TestGdk(unittest.TestCase):
         attributes_mask = Gdk.WindowAttributesType.X | \
             Gdk.WindowAttributesType.Y
         window = Gdk.Window(None, attribute, attributes_mask)
-        self.assertEquals(window.get_window_type(), Gdk.WindowType.CHILD)
+        self.assertEqual(window.get_window_type(), Gdk.WindowType.CHILD)
 
     def test_color(self):
         color = Gdk.Color(100, 200, 300)
-        self.assertEquals(color.red, 100)
-        self.assertEquals(color.green, 200)
-        self.assertEquals(color.blue, 300)
-        self.assertEquals(color, Gdk.Color(100, 200, 300))
+        self.assertEqual(color.red, 100)
+        self.assertEqual(color.green, 200)
+        self.assertEqual(color.blue, 300)
+        self.assertEqual(color, Gdk.Color(100, 200, 300))
         self.assertNotEquals(color, Gdk.Color(1, 2, 3))
 
     def test_rgba(self):
-        self.assertEquals(Gdk.RGBA, overrides.Gdk.RGBA)
+        self.assertEqual(Gdk.RGBA, overrides.Gdk.RGBA)
         rgba = Gdk.RGBA(0.1, 0.2, 0.3, 0.4)
-        self.assertEquals(rgba, Gdk.RGBA(0.1, 0.2, 0.3, 0.4))
+        self.assertEqual(rgba, Gdk.RGBA(0.1, 0.2, 0.3, 0.4))
         self.assertNotEquals(rgba, Gdk.RGBA(0.0, 0.2, 0.3, 0.4))
-        self.assertEquals(rgba.red, 0.1)
-        self.assertEquals(rgba.green, 0.2)
-        self.assertEquals(rgba.blue, 0.3)
-        self.assertEquals(rgba.alpha, 0.4)
+        self.assertEqual(rgba.red, 0.1)
+        self.assertEqual(rgba.green, 0.2)
+        self.assertEqual(rgba.blue, 0.3)
+        self.assertEqual(rgba.alpha, 0.4)
         rgba.green = 0.9
-        self.assertEquals(rgba.green, 0.9)
+        self.assertEqual(rgba.green, 0.9)
 
     def test_event(self):
         event = Gdk.Event.new(Gdk.EventType.CONFIGURE)
-        self.assertEquals(event.type, Gdk.EventType.CONFIGURE)
-        self.assertEquals(event.send_event, 0)
+        self.assertEqual(event.type, Gdk.EventType.CONFIGURE)
+        self.assertEqual(event.send_event, 0)
 
         event = Gdk.Event.new(Gdk.EventType.DRAG_MOTION)
         event.x_root, event.y_root = 0, 5
-        self.assertEquals(event.x_root, 0)
-        self.assertEquals(event.y_root, 5)
+        self.assertEqual(event.x_root, 0)
+        self.assertEqual(event.y_root, 5)
 
         event = Gdk.Event()
         event.type = Gdk.EventType.SCROLL
@@ -531,12 +531,12 @@ class TestGdk(unittest.TestCase):
         def button_press_cb(button, event):
             self.assertTrue(isinstance(event, Gdk.EventButton))
             self.assertTrue(event.type == Gdk.EventType.BUTTON_PRESS)
-            self.assertEquals(event.send_event, 0)
-            self.assertEquals(event.get_state(), Gdk.ModifierType.CONTROL_MASK)
-            self.assertEquals(event.get_root_coords(), (2, 5))
+            self.assertEqual(event.send_event, 0)
+            self.assertEqual(event.get_state(), Gdk.ModifierType.CONTROL_MASK)
+            self.assertEqual(event.get_root_coords(), (2, 5))
 
             event.time = 12345
-            self.assertEquals(event.get_time(), 12345)
+            self.assertEqual(event.get_time(), 12345)
 
         w = Gtk.Window()
         b = Gtk.Button()
@@ -550,7 +550,7 @@ class TestGdk(unittest.TestCase):
                                  Gdk.EventType.BUTTON_PRESS)
 
     def test_cursor(self):
-        self.assertEquals(Gdk.Cursor, overrides.Gdk.Cursor)
+        self.assertEqual(Gdk.Cursor, overrides.Gdk.Cursor)
         c = Gdk.Cursor(Gdk.CursorType.WATCH)
         self.assertNotEqual(c, None)
         c = Gdk.Cursor(cursor_type=Gdk.CursorType.WATCH)
@@ -593,35 +593,35 @@ class TestGtk(unittest.TestCase):
         self.assertEqual(l, [label, label2])
 
     def test_actions(self):
-        self.assertEquals(Gtk.Action, overrides.Gtk.Action)
+        self.assertEqual(Gtk.Action, overrides.Gtk.Action)
         self.assertRaises(TypeError, Gtk.Action)
         action = Gtk.Action("test", "Test", "Test Action", Gtk.STOCK_COPY)
-        self.assertEquals(action.get_name(), "test")
-        self.assertEquals(action.get_label(), "Test")
-        self.assertEquals(action.get_tooltip(), "Test Action")
-        self.assertEquals(action.get_stock_id(), Gtk.STOCK_COPY)
+        self.assertEqual(action.get_name(), "test")
+        self.assertEqual(action.get_label(), "Test")
+        self.assertEqual(action.get_tooltip(), "Test Action")
+        self.assertEqual(action.get_stock_id(), Gtk.STOCK_COPY)
 
-        self.assertEquals(Gtk.RadioAction, overrides.Gtk.RadioAction)
+        self.assertEqual(Gtk.RadioAction, overrides.Gtk.RadioAction)
         self.assertRaises(TypeError, Gtk.RadioAction)
         action = Gtk.RadioAction("test", "Test", "Test Action", Gtk.STOCK_COPY, 1)
-        self.assertEquals(action.get_name(), "test")
-        self.assertEquals(action.get_label(), "Test")
-        self.assertEquals(action.get_tooltip(), "Test Action")
-        self.assertEquals(action.get_stock_id(), Gtk.STOCK_COPY)
-        self.assertEquals(action.get_current_value(), 1)
+        self.assertEqual(action.get_name(), "test")
+        self.assertEqual(action.get_label(), "Test")
+        self.assertEqual(action.get_tooltip(), "Test Action")
+        self.assertEqual(action.get_stock_id(), Gtk.STOCK_COPY)
+        self.assertEqual(action.get_current_value(), 1)
 
     def test_actiongroup(self):
-        self.assertEquals(Gtk.ActionGroup, overrides.Gtk.ActionGroup)
+        self.assertEqual(Gtk.ActionGroup, overrides.Gtk.ActionGroup)
         self.assertRaises(TypeError, Gtk.ActionGroup)
 
         action_group = Gtk.ActionGroup(name='TestActionGroup')
         callback_data = "callback data"
 
         def test_action_callback_data(action, user_data):
-            self.assertEquals(user_data, callback_data)
+            self.assertEqual(user_data, callback_data)
 
         def test_radio_action_callback_data(action, current, user_data):
-            self.assertEquals(user_data, callback_data)
+            self.assertEqual(user_data, callback_data)
 
         action_group.add_actions([
             ('test-action1', None, 'Test Action 1',
@@ -653,7 +653,7 @@ class TestGtk(unittest.TestCase):
             action.activate()
 
     def test_uimanager(self):
-        self.assertEquals(Gtk.UIManager, overrides.Gtk.UIManager)
+        self.assertEqual(Gtk.UIManager, overrides.Gtk.UIManager)
         ui = Gtk.UIManager()
         ui.add_ui_from_string(
 """
@@ -663,18 +663,18 @@ class TestGtk(unittest.TestCase):
 """
 )
         menubar = ui.get_widget("/menubar1")
-        self.assertEquals(type(menubar), Gtk.MenuBar)
+        self.assertEqual(type(menubar), Gtk.MenuBar)
 
         ag = Gtk.ActionGroup(name="ag1")
         ui.insert_action_group(ag)
         ag2 = Gtk.ActionGroup(name="ag2")
         ui.insert_action_group(ag2)
         groups = ui.get_action_groups()
-        self.assertEquals(ag, groups[-2])
-        self.assertEquals(ag2, groups[-1])
+        self.assertEqual(ag, groups[-2])
+        self.assertEqual(ag2, groups[-1])
 
     def test_builder(self):
-        self.assertEquals(Gtk.Builder, overrides.Gtk.Builder)
+        self.assertEqual(Gtk.Builder, overrides.Gtk.Builder)
 
         class SignalTest(GObject.GObject):
             __gtype_name__ = "GIOverrideSignalTest"
@@ -737,21 +737,21 @@ class TestGtk(unittest.TestCase):
 
         # call their notify signals and check sentinel
         objects = builder.get_objects()
-        self.assertEquals(len(objects), 2)
+        self.assertEqual(len(objects), 2)
         for obj in objects:
             obj.emit('test-signal')
 
-        self.assertEquals(signal_checker.sentinel, 4)
-        self.assertEquals(signal_checker.after_sentinel, 2)
+        self.assertEqual(signal_checker.sentinel, 4)
+        self.assertEqual(signal_checker.after_sentinel, 2)
 
     def test_dialogs(self):
-        self.assertEquals(Gtk.Dialog, overrides.Gtk.Dialog)
-        self.assertEquals(Gtk.AboutDialog, overrides.Gtk.AboutDialog)
-        self.assertEquals(Gtk.MessageDialog, overrides.Gtk.MessageDialog)
-        self.assertEquals(Gtk.ColorSelectionDialog, overrides.Gtk.ColorSelectionDialog)
-        self.assertEquals(Gtk.FileChooserDialog, overrides.Gtk.FileChooserDialog)
-        self.assertEquals(Gtk.FontSelectionDialog, overrides.Gtk.FontSelectionDialog)
-        self.assertEquals(Gtk.RecentChooserDialog, overrides.Gtk.RecentChooserDialog)
+        self.assertEqual(Gtk.Dialog, overrides.Gtk.Dialog)
+        self.assertEqual(Gtk.AboutDialog, overrides.Gtk.AboutDialog)
+        self.assertEqual(Gtk.MessageDialog, overrides.Gtk.MessageDialog)
+        self.assertEqual(Gtk.ColorSelectionDialog, overrides.Gtk.ColorSelectionDialog)
+        self.assertEqual(Gtk.FileChooserDialog, overrides.Gtk.FileChooserDialog)
+        self.assertEqual(Gtk.FontSelectionDialog, overrides.Gtk.FontSelectionDialog)
+        self.assertEqual(Gtk.RecentChooserDialog, overrides.Gtk.RecentChooserDialog)
 
         # Gtk.Dialog
         dialog = Gtk.Dialog(title='Foo',
@@ -762,14 +762,14 @@ class TestGtk(unittest.TestCase):
 
         dialog.add_buttons('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
 
-        self.assertEquals('Foo', dialog.get_title())
+        self.assertEqual('Foo', dialog.get_title())
         self.assertTrue(dialog.get_modal())
         button = dialog.get_widget_for_response(1)
-        self.assertEquals('test-button1', button.get_label())
+        self.assertEqual('test-button1', button.get_label())
         button = dialog.get_widget_for_response(2)
-        self.assertEquals('test-button2', button.get_label())
+        self.assertEqual('test-button2', button.get_label())
         button = dialog.get_widget_for_response(Gtk.ResponseType.CLOSE)
-        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertEqual(Gtk.STOCK_CLOSE, button.get_label())
 
         # Gtk.AboutDialog
         dialog = Gtk.AboutDialog()
@@ -784,10 +784,10 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(dialog, Gtk.Dialog))
         self.assertTrue(isinstance(dialog, Gtk.Window))
 
-        self.assertEquals('message dialog test', dialog.get_title())
+        self.assertEqual('message dialog test', dialog.get_title())
         self.assertTrue(dialog.get_modal())
         text = dialog.get_property('text')
-        self.assertEquals('dude!', text)
+        self.assertEqual('dude!', text)
 
         dialog.format_secondary_text('2nd text')
         self.assertEqual(dialog.get_property('secondary-text'), '2nd text')
@@ -801,7 +801,7 @@ class TestGtk(unittest.TestCase):
         dialog = Gtk.ColorSelectionDialog("color selection dialog test")
         self.assertTrue(isinstance(dialog, Gtk.Dialog))
         self.assertTrue(isinstance(dialog, Gtk.Window))
-        self.assertEquals('color selection dialog test', dialog.get_title())
+        self.assertEqual('color selection dialog test', dialog.get_title())
 
         # Gtk.FileChooserDialog
         dialog = Gtk.FileChooserDialog(title='file chooser dialog test',
@@ -811,21 +811,21 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(dialog, Gtk.Window))
 
         dialog.add_buttons('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
-        self.assertEquals('file chooser dialog test', dialog.get_title())
+        self.assertEqual('file chooser dialog test', dialog.get_title())
         button = dialog.get_widget_for_response(1)
-        self.assertEquals('test-button1', button.get_label())
+        self.assertEqual('test-button1', button.get_label())
         button = dialog.get_widget_for_response(2)
-        self.assertEquals('test-button2', button.get_label())
+        self.assertEqual('test-button2', button.get_label())
         button = dialog.get_widget_for_response(Gtk.ResponseType.CLOSE)
-        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertEqual(Gtk.STOCK_CLOSE, button.get_label())
         action = dialog.get_property('action')
-        self.assertEquals(Gtk.FileChooserAction.SAVE, action)
+        self.assertEqual(Gtk.FileChooserAction.SAVE, action)
 
         # Gtk.FontSelectionDialog
         dialog = Gtk.ColorSelectionDialog("font selection dialog test")
         self.assertTrue(isinstance(dialog, Gtk.Dialog))
         self.assertTrue(isinstance(dialog, Gtk.Window))
-        self.assertEquals('font selection dialog test', dialog.get_title())
+        self.assertEqual('font selection dialog test', dialog.get_title())
 
         # Gtk.RecentChooserDialog
         test_manager = Gtk.RecentManager()
@@ -836,13 +836,13 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(dialog, Gtk.Window))
 
         dialog.add_buttons('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
-        self.assertEquals('recent chooser dialog test', dialog.get_title())
+        self.assertEqual('recent chooser dialog test', dialog.get_title())
         button = dialog.get_widget_for_response(1)
-        self.assertEquals('test-button1', button.get_label())
+        self.assertEqual('test-button1', button.get_label())
         button = dialog.get_widget_for_response(2)
-        self.assertEquals('test-button2', button.get_label())
+        self.assertEqual('test-button2', button.get_label())
         button = dialog.get_widget_for_response(Gtk.ResponseType.CLOSE)
-        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertEqual(Gtk.STOCK_CLOSE, button.get_label())
 
     class TestClass(GObject.GObject):
         __gtype_name__ = "GIOverrideTreeAPITest"
@@ -854,14 +854,14 @@ class TestGtk(unittest.TestCase):
             self.string_value = string_value
 
         def check(self, int_value, string_value):
-            self.tester.assertEquals(int_value, self.int_value)
-            self.tester.assertEquals(string_value, self.string_value)
+            self.tester.assertEqual(int_value, self.int_value)
+            self.tester.assertEqual(string_value, self.string_value)
 
     def test_tree_store(self):
-        self.assertEquals(Gtk.TreeStore, overrides.Gtk.TreeStore)
-        self.assertEquals(Gtk.ListStore, overrides.Gtk.ListStore)
-        self.assertEquals(Gtk.TreeModel, overrides.Gtk.TreeModel)
-        self.assertEquals(Gtk.TreeViewColumn, overrides.Gtk.TreeViewColumn)
+        self.assertEqual(Gtk.TreeStore, overrides.Gtk.TreeStore)
+        self.assertEqual(Gtk.ListStore, overrides.Gtk.ListStore)
+        self.assertEqual(Gtk.TreeModel, overrides.Gtk.TreeModel)
+        self.assertEqual(Gtk.TreeViewColumn, overrides.Gtk.TreeViewColumn)
 
         class TestPyObject(object):
             pass
@@ -970,7 +970,7 @@ class TestGtk(unittest.TestCase):
         # len gets the number of children in the root node
         # since we kept appending to the previous node
         # there should only be one child of the root
-        self.assertEquals(len(tree_store), 1)
+        self.assertEqual(len(tree_store), 1)
 
         # walk the tree to see if the values were stored correctly
         parent = None
@@ -983,38 +983,38 @@ class TestGtk(unittest.TestCase):
             obj = tree_store.get_value(treeiter, 2)
             obj.check(i, s)
             obj2 = tree_store.get_value(treeiter, 3)
-            self.assertEquals(obj, obj2)
+            self.assertEqual(obj, obj2)
 
             pyobj = tree_store.get_value(treeiter, 4)
-            self.assertEquals(pyobj, test_pyobj)
+            self.assertEqual(pyobj, test_pyobj)
             pydict = tree_store.get_value(treeiter, 5)
-            self.assertEquals(pydict, test_pydict)
+            self.assertEqual(pydict, test_pydict)
             pylist = tree_store.get_value(treeiter, 6)
-            self.assertEquals(pylist, test_pylist)
+            self.assertEqual(pylist, test_pylist)
 
             bool_1 = tree_store.get_value(treeiter, 7)
             bool_2 = tree_store.get_value(treeiter, 8)
-            self.assertEquals(bool_1, bool_2)
+            self.assertEqual(bool_1, bool_2)
             self.assertTrue(isinstance(bool_1, bool))
             self.assertTrue(isinstance(bool_2, bool))
 
             uint_ = tree_store.get_value(treeiter, 9)
-            self.assertEquals(uint_, i)
+            self.assertEqual(uint_, i)
             ulong_ = tree_store.get_value(treeiter, 10)
-            self.assertEquals(ulong_, GObject.G_MAXULONG)
+            self.assertEqual(ulong_, GObject.G_MAXULONG)
             int64_ = tree_store.get_value(treeiter, 11)
-            self.assertEquals(int64_, GObject.G_MININT64)
+            self.assertEqual(int64_, GObject.G_MININT64)
             uint64_ = tree_store.get_value(treeiter, 12)
-            self.assertEquals(uint64_, 0xffffffffffffffff)
+            self.assertEqual(uint64_, 0xffffffffffffffff)
             uchar_ = tree_store.get_value(treeiter, 13)
-            self.assertEquals(ord(uchar_), 254)
+            self.assertEqual(ord(uchar_), 254)
             char_ = tree_store.get_value(treeiter, 14)
-            self.assertEquals(char_, 'a')
+            self.assertEqual(char_, 'a')
 
             parent = treeiter
             treeiter = tree_store.iter_children(parent)
 
-        self.assertEquals(i, 99)
+        self.assertEqual(i, 99)
 
     def test_tree_store_signals(self):
         tree_store = Gtk.TreeStore(int, bool)
@@ -1208,7 +1208,7 @@ class TestGtk(unittest.TestCase):
                                    0,
                                    False))
 
-        self.assertEquals(len(list_store), 103)
+        self.assertEqual(len(list_store), 103)
 
         # walk the list to see if the values were stored correctly
         i = 0
@@ -1217,21 +1217,21 @@ class TestGtk(unittest.TestCase):
         counter = 0
         while treeiter:
             i = list_store.get_value(treeiter, 0)
-            self.assertEquals(i, counter)
+            self.assertEqual(i, counter)
             s = list_store.get_value(treeiter, 1)
             obj = list_store.get_value(treeiter, 2)
             obj.check(i, s)
 
             pyobj = list_store.get_value(treeiter, 3)
-            self.assertEquals(pyobj, test_pyobj)
+            self.assertEqual(pyobj, test_pyobj)
             pydict = list_store.get_value(treeiter, 4)
-            self.assertEquals(pydict, test_pydict)
+            self.assertEqual(pydict, test_pydict)
             pylist = list_store.get_value(treeiter, 5)
-            self.assertEquals(pylist, test_pylist)
+            self.assertEqual(pylist, test_pylist)
 
             bool_1 = list_store.get_value(treeiter, 6)
             bool_2 = list_store.get_value(treeiter, 7)
-            self.assertEquals(bool_1, bool_2)
+            self.assertEqual(bool_1, bool_2)
             self.assertTrue(isinstance(bool_1, bool))
             self.assertTrue(isinstance(bool_2, bool))
 
@@ -1239,7 +1239,7 @@ class TestGtk(unittest.TestCase):
 
             counter += 1
 
-        self.assertEquals(i, 102)
+        self.assertEqual(i, 102)
 
     def test_list_store_signals(self):
         list_store = Gtk.ListStore(int, bool)
@@ -1302,7 +1302,7 @@ class TestGtk(unittest.TestCase):
         self.assertFalse(p1 < None)
         self.assertFalse(p1 <= None)
 
-        self.assertEquals(tuple(p1), (1, 2, 3))
+        self.assertEqual(tuple(p1), (1, 2, 3))
 
     def test_tree_model(self):
         tree_store = Gtk.TreeStore(int, str)
@@ -1576,12 +1576,12 @@ class TestGtk(unittest.TestCase):
         self.assertEqual(store.get_path(s), firstpath)
 
     def test_text_buffer(self):
-        self.assertEquals(Gtk.TextBuffer, overrides.Gtk.TextBuffer)
+        self.assertEqual(Gtk.TextBuffer, overrides.Gtk.TextBuffer)
         buffer = Gtk.TextBuffer()
         tag = buffer.create_tag('title', font='Sans 18')
 
-        self.assertEquals(tag.props.name, 'title')
-        self.assertEquals(tag.props.font, 'Sans 18')
+        self.assertEqual(tag.props.name, 'title')
+        self.assertEqual(tag.props.font, 'Sans 18')
 
         (start, end) = buffer.get_bounds()
 
@@ -1591,12 +1591,12 @@ class TestGtk(unittest.TestCase):
         buffer.set_text('Hello Jane Hello Bob')
         (start, end) = buffer.get_bounds()
         text = buffer.get_text(start, end, False)
-        self.assertEquals(text, 'Hello Jane Hello Bob')
+        self.assertEqual(text, 'Hello Jane Hello Bob')
 
         buffer.set_text('')
         (start, end) = buffer.get_bounds()
         text = buffer.get_text(start, end, False)
-        self.assertEquals(text, '')
+        self.assertEqual(text, '')
 
         buffer.insert(end, 'HelloHello')
         buffer.insert(end, ' Bob')
@@ -1608,10 +1608,10 @@ class TestGtk(unittest.TestCase):
 
         (start, end) = buffer.get_bounds()
         text = buffer.get_text(start, end, False)
-        self.assertEquals(text, 'Hello Jane Hello Bob')
+        self.assertEqual(text, 'Hello Jane Hello Bob')
 
         sel = buffer.get_selection_bounds()
-        self.assertEquals(sel, ())
+        self.assertEqual(sel, ())
         buffer.select_range(start, end)
         sel = buffer.get_selection_bounds()
         self.assertTrue(sel[0].equal(start))
@@ -1633,7 +1633,7 @@ class TestGtk(unittest.TestCase):
                 buffer.get_start_iter(), 'HelloHello', 'unknowntag')
 
     def test_text_iter(self):
-        self.assertEquals(Gtk.TextIter, overrides.Gtk.TextIter)
+        self.assertEqual(Gtk.TextIter, overrides.Gtk.TextIter)
         buffer = Gtk.TextBuffer()
         buffer.set_text('Hello Jane Hello Bob')
         tag = buffer.create_tag('title', font='Sans 18')
@@ -1650,7 +1650,7 @@ class TestGtk(unittest.TestCase):
         self.assertFalse(start.toggles_tag())
 
     def test_buttons(self):
-        self.assertEquals(Gtk.Button, overrides.Gtk.Button)
+        self.assertEqual(Gtk.Button, overrides.Gtk.Button)
 
         # test Gtk.Button
         button = Gtk.Button()
@@ -1658,13 +1658,13 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(button, Gtk.Container))
         self.assertTrue(isinstance(button, Gtk.Widget))
         button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
-        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertEqual(Gtk.STOCK_CLOSE, button.get_label())
         self.assertTrue(button.get_use_stock())
         self.assertTrue(button.get_use_underline())
 
         # test Gtk.Button use_stock
         button = Gtk.Button(label=Gtk.STOCK_CLOSE, use_stock=True, use_underline=True)
-        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertEqual(Gtk.STOCK_CLOSE, button.get_label())
         self.assertTrue(button.get_use_stock())
         self.assertTrue(button.get_use_underline())
 
@@ -1674,8 +1674,8 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(button, Gtk.Button))
         self.assertTrue(isinstance(button, Gtk.Container))
         self.assertTrue(isinstance(button, Gtk.Widget))
-        self.assertEquals('http://www.Gtk.org', button.get_uri())
-        self.assertEquals('Gtk', button.get_label())
+        self.assertEqual('http://www.Gtk.org', button.get_uri())
+        self.assertEqual('Gtk', button.get_label())
 
     def test_inheritance(self):
         for name in overrides.Gtk.__all__:
@@ -1704,30 +1704,30 @@ class TestGtk(unittest.TestCase):
                             "%r does not inherit from override %r" % (klass, over,))
 
     def test_editable(self):
-        self.assertEquals(Gtk.Editable, overrides.Gtk.Editable)
+        self.assertEqual(Gtk.Editable, overrides.Gtk.Editable)
 
         # need to use Gtk.Entry because Editable is an interface
         entry = Gtk.Entry()
         pos = entry.insert_text('HeWorld', 0)
-        self.assertEquals(pos, 7)
+        self.assertEqual(pos, 7)
         pos = entry.insert_text('llo ', 2)
-        self.assertEquals(pos, 6)
+        self.assertEqual(pos, 6)
         text = entry.get_chars(0, 11)
-        self.assertEquals('Hello World', text)
+        self.assertEqual('Hello World', text)
 
     def test_label(self):
         label = Gtk.Label(label='Hello')
         self.assertTrue(isinstance(label, Gtk.Widget))
-        self.assertEquals(label.get_text(), 'Hello')
+        self.assertEqual(label.get_text(), 'Hello')
 
     def adjustment_check(self, adjustment, value=0.0, lower=0.0, upper=0.0,
                          step_increment=0.0, page_increment=0.0, page_size=0.0):
-        self.assertEquals(adjustment.get_value(), value)
-        self.assertEquals(adjustment.get_lower(), lower)
-        self.assertEquals(adjustment.get_upper(), upper)
-        self.assertEquals(adjustment.get_step_increment(), step_increment)
-        self.assertEquals(adjustment.get_page_increment(), page_increment)
-        self.assertEquals(adjustment.get_page_size(), page_size)
+        self.assertEqual(adjustment.get_value(), value)
+        self.assertEqual(adjustment.get_lower(), lower)
+        self.assertEqual(adjustment.get_upper(), upper)
+        self.assertEqual(adjustment.get_step_increment(), step_increment)
+        self.assertEqual(adjustment.get_page_increment(), page_increment)
+        self.assertEqual(adjustment.get_page_size(), page_size)
 
     def test_adjustment(self):
         adjustment = Gtk.Adjustment(1, 0, 6, 4, 5, 3)
@@ -1754,27 +1754,27 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(table, Gtk.Table))
         self.assertTrue(isinstance(table, Gtk.Container))
         self.assertTrue(isinstance(table, Gtk.Widget))
-        self.assertEquals(table.get_size(), (1, 1))
-        self.assertEquals(table.get_homogeneous(), False)
+        self.assertEqual(table.get_size(), (1, 1))
+        self.assertEqual(table.get_homogeneous(), False)
         table = Gtk.Table(2, 3)
-        self.assertEquals(table.get_size(), (2, 3))
-        self.assertEquals(table.get_homogeneous(), False)
+        self.assertEqual(table.get_size(), (2, 3))
+        self.assertEqual(table.get_homogeneous(), False)
         table = Gtk.Table(2, 3, True)
-        self.assertEquals(table.get_size(), (2, 3))
-        self.assertEquals(table.get_homogeneous(), True)
+        self.assertEqual(table.get_size(), (2, 3))
+        self.assertEqual(table.get_homogeneous(), True)
 
         # Test PyGTK interface
         table = Gtk.Table(rows=3, columns=2)
-        self.assertEquals(table.get_size(), (3, 2))
+        self.assertEqual(table.get_size(), (3, 2))
         # Test using the actual property names
         table = Gtk.Table(n_rows=2, n_columns=3, homogeneous=True)
-        self.assertEquals(table.get_size(), (2, 3))
-        self.assertEquals(table.get_homogeneous(), True)
+        self.assertEqual(table.get_size(), (2, 3))
+        self.assertEqual(table.get_homogeneous(), True)
 
         label = Gtk.Label(label='Hello')
         self.assertTrue(isinstance(label, Gtk.Widget))
         table.attach(label, 0, 1, 0, 1)
-        self.assertEquals(label, table.get_children()[0])
+        self.assertEqual(label, table.get_children()[0])
 
     def test_scrolledwindow(self):
         sw = Gtk.ScrolledWindow()
@@ -1782,9 +1782,9 @@ class TestGtk(unittest.TestCase):
         self.assertTrue(isinstance(sw, Gtk.Container))
         self.assertTrue(isinstance(sw, Gtk.Widget))
         sb = sw.get_hscrollbar()
-        self.assertEquals(sw.get_hadjustment(), sb.get_adjustment())
+        self.assertEqual(sw.get_hadjustment(), sb.get_adjustment())
         sb = sw.get_vscrollbar()
-        self.assertEquals(sw.get_vadjustment(), sb.get_adjustment())
+        self.assertEqual(sw.get_vadjustment(), sb.get_adjustment())
 
     def test_widget_drag_methods(self):
         widget = Gtk.Button()
@@ -1836,25 +1836,25 @@ class TestGtk(unittest.TestCase):
 
         hscrollbar = Gtk.HScrollbar(adjustment)
         vscrollbar = Gtk.VScrollbar(adjustment)
-        self.assertEquals(hscrollbar.props.adjustment, adjustment)
-        self.assertEquals(vscrollbar.props.adjustment, adjustment)
+        self.assertEqual(hscrollbar.props.adjustment, adjustment)
+        self.assertEqual(vscrollbar.props.adjustment, adjustment)
 
     def test_iconview(self):
         # PyGTK compat
         iconview = Gtk.IconView()
-        self.assertEquals(iconview.props.model, None)
+        self.assertEqual(iconview.props.model, None)
 
         model = Gtk.ListStore(str)
         iconview = Gtk.IconView(model)
-        self.assertEquals(iconview.props.model, model)
+        self.assertEqual(iconview.props.model, model)
 
     def test_toolbutton(self):
         # PyGTK compat
         button = Gtk.ToolButton()
-        self.assertEquals(button.props.stock_id, None)
+        self.assertEqual(button.props.stock_id, None)
 
         button = Gtk.ToolButton('gtk-new')
-        self.assertEquals(button.props.stock_id, 'gtk-new')
+        self.assertEqual(button.props.stock_id, 'gtk-new')
 
     def test_iconset(self):
         # PyGTK compat
@@ -1870,8 +1870,8 @@ class TestGtk(unittest.TestCase):
         viewport = Gtk.Viewport(hadjustment=hadjustment,
                                 vadjustment=vadjustment)
 
-        self.assertEquals(viewport.props.vadjustment, vadjustment)
-        self.assertEquals(viewport.props.hadjustment, hadjustment)
+        self.assertEqual(viewport.props.vadjustment, vadjustment)
+        self.assertEqual(viewport.props.hadjustment, hadjustment)
 
 
 class TestGio(unittest.TestCase):
@@ -1883,7 +1883,7 @@ class TestGio(unittest.TestCase):
         self.settings.reset('test-array')
 
     def test_file_enumerator(self):
-        self.assertEquals(Gio.FileEnumerator, overrides.Gio.FileEnumerator)
+        self.assertEqual(Gio.FileEnumerator, overrides.Gio.FileEnumerator)
         f = Gio.file_new_for_path("./")
 
         iter_info = []
@@ -1898,7 +1898,7 @@ class TestGio(unittest.TestCase):
                 break
             next_info.append(info.get_name())
 
-        self.assertEquals(iter_info, next_info)
+        self.assertEqual(iter_info, next_info)
 
     def test_gsettings_native(self):
         self.assertTrue('test-array' in self.settings.list_keys())
diff --git a/tests/test_properties.py b/tests/test_properties.py
index ba55634..5ae2b47 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -370,9 +370,9 @@ class TestProperty(unittest.TestCase):
                 GObject.GObject.__init__(self)
 
         o = C()
-        self.assertEquals(o._value, None)
+        self.assertEqual(o._value, None)
         o.prop = 'bar'
-        self.assertEquals(o._value, 'bar')
+        self.assertEqual(o._value, 'bar')
         self.assertRaises(TypeError, getattr, o, 'prop')
 
     def testDecoratorDefault(self):
@@ -549,9 +549,9 @@ class TestProperty(unittest.TestCase):
 
         b = B()
         b.prop2 = 10
-        self.assertEquals(b.prop2, 10)
+        self.assertEqual(b.prop2, 10)
         b.prop1 = 20
-        self.assertEquals(b.prop1, 20)
+        self.assertEqual(b.prop1, 20)
 
     def testPropertySubclassCustomSetter(self):
         # test for #523352
@@ -566,13 +566,13 @@ class TestProperty(unittest.TestCase):
             second = GObject.Property(type=str, getter=get_second)
 
         a = A()
-        self.assertEquals(a.first, 'first')
+        self.assertEqual(a.first, 'first')
         self.assertRaises(TypeError, setattr, a, 'first', 'foo')
 
         b = B()
-        self.assertEquals(b.first, 'first')
+        self.assertEqual(b.first, 'first')
         self.assertRaises(TypeError, setattr, b, 'first', 'foo')
-        self.assertEquals(b.second, 'second')
+        self.assertEqual(b.second, 'second')
         self.assertRaises(TypeError, setattr, b, 'second', 'foo')
 
     def testPropertySubclassCustomSetterError(self):
@@ -610,14 +610,14 @@ class TestProperty(unittest.TestCase):
         # want to observe. Its refcount is increased by one.
         t = PropertyObject(normal="test")
         t.o = o
-        self.assertEquals(sys.getrefcount(o), rc + 1)
+        self.assertEqual(sys.getrefcount(o), rc + 1)
 
         # Now we want to ensure we do not leak any references to our
         # object with properties. If no ref is leaked, then when deleting
         # the local reference to this object, its reference count shoud
         # drop to zero, and our dummy object should loose one reference.
         del t
-        self.assertEquals(sys.getrefcount(o), rc)
+        self.assertEqual(sys.getrefcount(o), rc)
 
     def testDocStringAsBlurb(self):
         class C(GObject.GObject):
diff --git a/tests/test_pygtkcompat.py b/tests/test_pygtkcompat.py
index 5999a75..c837035 100644
--- a/tests/test_pygtkcompat.py
+++ b/tests/test_pygtkcompat.py
@@ -38,19 +38,19 @@ class TestPangoCairoCompat(unittest.TestCase):
 
 class TestGTKCompat(unittest.TestCase):
     def testButtons(self):
-        self.assertEquals(Gdk._2BUTTON_PRESS, 5)
-        self.assertEquals(Gdk.BUTTON_PRESS, 4)
+        self.assertEqual(Gdk._2BUTTON_PRESS, 5)
+        self.assertEqual(Gdk.BUTTON_PRESS, 4)
 
     def testEnums(self):
-        self.assertEquals(gtk.WINDOW_TOPLEVEL, Gtk.WindowType.TOPLEVEL)
-        self.assertEquals(gtk.PACK_START, Gtk.PackType.START)
+        self.assertEqual(gtk.WINDOW_TOPLEVEL, Gtk.WindowType.TOPLEVEL)
+        self.assertEqual(gtk.PACK_START, Gtk.PackType.START)
 
     def testFlags(self):
-        self.assertEquals(gtk.EXPAND, Gtk.AttachOptions.EXPAND)
+        self.assertEqual(gtk.EXPAND, Gtk.AttachOptions.EXPAND)
 
     def testKeysyms(self):
         import gtk.keysyms
-        self.assertEquals(gtk.keysyms.Escape, Gdk.KEY_Escape)
+        self.assertEqual(gtk.keysyms.Escape, Gdk.KEY_Escape)
         self.assertTrue(gtk.keysyms._0, Gdk.KEY_0)
 
     def testStyle(self):
@@ -60,10 +60,10 @@ class TestGTKCompat(unittest.TestCase):
 
     def testAlignment(self):
         a = gtk.Alignment()
-        self.assertEquals(a.props.xalign, 0.0)
-        self.assertEquals(a.props.yalign, 0.0)
-        self.assertEquals(a.props.xscale, 0.0)
-        self.assertEquals(a.props.yscale, 0.0)
+        self.assertEqual(a.props.xalign, 0.0)
+        self.assertEqual(a.props.yalign, 0.0)
+        self.assertEqual(a.props.xscale, 0.0)
+        self.assertEqual(a.props.yscale, 0.0)
 
     def testBox(self):
         box = gtk.Box()
@@ -73,16 +73,16 @@ class TestGTKCompat(unittest.TestCase):
         expand, fill, padding, pack_type = box.query_child_packing(child)
         self.assertTrue(expand)
         self.assertTrue(fill)
-        self.assertEquals(padding, 0)
-        self.assertEquals(pack_type, gtk.PACK_START)
+        self.assertEqual(padding, 0)
+        self.assertEqual(pack_type, gtk.PACK_START)
 
         child = gtk.Button()
         box.pack_end(child)
         expand, fill, padding, pack_type = box.query_child_packing(child)
         self.assertTrue(expand)
         self.assertTrue(fill)
-        self.assertEquals(padding, 0)
-        self.assertEquals(pack_type, gtk.PACK_END)
+        self.assertEqual(padding, 0)
+        self.assertEqual(pack_type, gtk.PACK_END)
 
     def testComboBoxEntry(self):
         liststore = gtk.ListStore(int, str)
@@ -92,19 +92,19 @@ class TestGTKCompat(unittest.TestCase):
         combo = gtk.ComboBoxEntry(model=liststore)
         combo.set_text_column(1)
         combo.set_active(0)
-        self.assertEquals(combo.get_text_column(), 1)
-        self.assertEquals(combo.get_child().get_text(), 'One')
+        self.assertEqual(combo.get_text_column(), 1)
+        self.assertEqual(combo.get_child().get_text(), 'One')
         combo = gtk.combo_box_entry_new()
         combo.set_model(liststore)
         combo.set_text_column(1)
         combo.set_active(0)
-        self.assertEquals(combo.get_text_column(), 1)
-        self.assertEquals(combo.get_child().get_text(), 'One')
+        self.assertEqual(combo.get_text_column(), 1)
+        self.assertEqual(combo.get_child().get_text(), 'One')
         combo = gtk.combo_box_entry_new_with_model(liststore)
         combo.set_text_column(1)
         combo.set_active(0)
-        self.assertEquals(combo.get_text_column(), 1)
-        self.assertEquals(combo.get_child().get_text(), 'One')
+        self.assertEqual(combo.get_text_column(), 1)
+        self.assertEqual(combo.get_child().get_text(), 'One')
 
     def testPixbuf(self):
         gtk.gdk.Pixbuf()
@@ -116,4 +116,4 @@ class TestGTKCompat(unittest.TestCase):
     def testGdkWindow(self):
         w = gtk.Window()
         w.realize()
-        self.assertEquals(w.get_window().get_origin(), (0, 0))
+        self.assertEqual(w.get_window().get_origin(), (0, 0))



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