[pygobject] use actual unicode in the tests on py3k, not the byte representation



commit a808bdabb9fa6f4a9b9ce42e1cce05fb37403f0f
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Sep 9 13:24:30 2010 -0400

    use actual unicode in the tests on py3k, not the byte representation
    
    https://bugzilla.gnome.org/show_bug.cgi?id=615872

 tests/test_gi.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index b7cf733..6e418d2 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1,6 +1,7 @@
 # -*- Mode: Python; py-indent-offset: 4 -*-
 # vim: tabstop=4 shiftwidth=4 expandtab
 
+import sys
 import pygtk
 pygtk.require("2.0")
 
@@ -10,8 +11,11 @@ from gi.repository import GObject
 import gobject
 from gi.repository import GIMarshallingTests
 
+if sys.version_info < (3, 0):
+    CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8" 
+else:
+    CONSTANT_UTF8 = "const â?¥ utf8"
 
-CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8"
 CONSTANT_NUMBER = 42
 
 



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