[pygobject] tests: Fixed issues with python3
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Fixed issues with python3
- Date: Mon, 6 Feb 2012 17:56:02 +0000 (UTC)
commit 0e921cd26ed5a6e3bc6ef5f553e8b22b862d72a6
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date: Sun Feb 5 13:47:10 2012 +0100
tests: Fixed issues with python3
tests/test_gi.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index a86e226..b066626 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -775,15 +775,18 @@ class TestArray(unittest.TestCase):
def test_array_gvariant_none_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
+ returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
+ self.assertEquals([27, "Hello"], returned)
def test_array_gvariant_container_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
+ returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
+ self.assertEquals([27, "Hello"], returned)
def test_array_gvariant_full_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
+ returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
+ self.assertEquals([27, "Hello"], returned)
def test_bytearray_gvariant(self):
v = GLib.Variant.new_bytestring(b"foo")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]