[pygobject] [gi] in python 3 an array of uint8 can be bytes but not string
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gi] in python 3 an array of uint8 can be bytes but not string
- Date: Wed, 26 Jan 2011 20:36:31 +0000 (UTC)
commit a3e0cfe8924887ecd1e07cedd2cfb999c853ac62
Author: John (J5) Palmieri <johnp redhat com>
Date: Wed Jan 26 15:34:24 2011 -0500
[gi] in python 3 an array of uint8 can be bytes but not string
tests/test_gi.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 3598e61..eede8ff 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -10,6 +10,8 @@ from gi.repository import GObject
import gobject
from gi.repository import GIMarshallingTests
+from compathelper import _bytes
+
if sys.version_info < (3, 0):
CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8"
PY2_UNICODE_UTF8 = unicode(CONSTANT_UTF8, 'UTF-8')
@@ -673,7 +675,7 @@ class TestArray(unittest.TestCase):
def test_array_uint8_in(self):
GIMarshallingTests.array_uint8_in(Sequence([97, 98, 99, 100]))
- GIMarshallingTests.array_uint8_in("abcd")
+ GIMarshallingTests.array_uint8_in(_bytes("abcd"))
def test_array_out(self):
self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_out())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]