[pygobject] test_gi: Enable GByteArray constructor tests



commit 5a5940a0a0704be8e222d4cad6cedda1ad3e0f71
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Nov 9 09:37:00 2012 +0100

    test_gi: Enable GByteArray constructor tests
    
    GByteArray annotations have been fixed in GLib now, enable the test case.
    
    Drop the redundant disabled_test_bytearray_none_in_from_bytes() test, as this
    is the same as disabled_test_bytearray_none_in().

 tests/test_gi.py |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 067b076..ac81fc9 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1014,26 +1014,18 @@ class TestGBytes(unittest.TestCase):
 
 
 class TestGByteArray(unittest.TestCase):
-    # FIXME: g_byte_array_new() not introspectable
-    def disabled_test_create(self):
+    def test_new(self):
         ba = GLib.ByteArray.new()
-        self.assertEqual(0, ba.len)
+        self.assertEqual(b'', ba)
 
-    # FIXME: g_byte_array_new_take() wrongly annotated
-    def disabled_test_new_take(self):
         ba = GLib.ByteArray.new_take(b'\x01\x02\xFF')
-        self.assertEqual(3, ba.len)
+        self.assertEqual(b'\x01\x02\xFF', ba)
 
     def test_bytearray_full_return(self):
         self.assertEqual(b'\x001\xFF3', GIMarshallingTests.bytearray_full_return())
 
-    # FIXME: ByteArray gets mangled, length comes out as 0
-    def disabled_test_bytearray_none_in(self):
-        ba = GIMarshallingTests.bytearray_full_return()
-        GIMarshallingTests.bytearray_none_in(ba)
-
     # FIXME: we do not currently support marshalling GByteArrays
-    def disabled_test_bytearray_none_in_from_bytes(self):
+    def disabled_test_bytearray_none_in(self):
         GIMarshallingTests.bytearray_none_in(b'\x00\x31\xFF\x33')
 
 



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