[pygobject] test_gi: Stop using GLib.bytes.unref_to_array()
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_gi: Stop using GLib.bytes.unref_to_array()
- Date: Tue, 13 Nov 2012 12:16:49 +0000 (UTC)
commit 9879fd41a7d8d72f8db9cadf5b1ee29fc4d5d6bf
Author: Martin Pitt <martinpitt gnome org>
Date: Tue Nov 13 13:16:14 2012 +0100
test_gi: Stop using GLib.bytes.unref_to_array()
This method isn't safe for GI, and should be (skip)ed. Use get_data() instead
which is safe and works fine.
See https://bugzilla.gnome.org/show_bug.cgi?id=688242
tests/test_gi.py | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 275baab..d6de4db 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -976,23 +976,17 @@ class TestGBytes(unittest.TestCase):
b = GLib.Bytes.new(b'\x00\x01\xFF')
self.assertEqual(3, b.get_size())
self.assertEqual(b'\x00\x01\xFF', b.get_data())
- # FIXME: crashes at cleanup, double-free
- #self.assertEqual(b'\x00\x01\xFF', b.unref_to_array())
def test_gbytes_create_take(self):
b = GLib.Bytes.new_take(b'\x00\x01\xFF')
self.assertEqual(3, b.get_size())
self.assertEqual(b'\x00\x01\xFF', b.get_data())
- # FIXME: crashes at cleanup, double-free
- #self.assertEqual(b'\x00\x01\xFF', b.unref_to_array())
def test_gbytes_full_return(self):
b = GIMarshallingTests.gbytes_full_return()
self.assertEqual(4, b.get_size())
self.assertEqual(b'\x00\x31\xFF\x33', b.get_data())
- self.assertEqual(b'\x00\x31\xFF\x33', b.unref_to_array())
-
def test_gbytes_none_in(self):
b = GIMarshallingTests.gbytes_full_return()
GIMarshallingTests.gbytes_none_in(b)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]