Py3 test fix
authorStefan Behnel <scoder@users.berlios.de>
Tue, 26 Apr 2011 07:21:58 +0000 (09:21 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 26 Apr 2011 07:21:58 +0000 (09:21 +0200)
tests/run/arithmetic_analyse_types.pyx

index d37ef86a0221370113cd9d6d9a8deb3639c00eb8..7d5e41666a9f082539fc3fcf298df6b7c690ace9 100644 (file)
@@ -18,40 +18,40 @@ def short_binop(short val):
     """
     Arithmetic in C is always done with at least int precision.
     
     """
     Arithmetic in C is always done with at least int precision.
     
-    >>> short_binop(3)
-    'int called'
+    >>> print(short_binop(3))
+    int called
     """
     assert typeof(val + val) == "int", typeof(val + val)
     assert typeof(val - val) == "int", typeof(val - val)
     assert typeof(val & val) == "int", typeof(val & val)
     cdef int_return x = f(val + val)
     """
     assert typeof(val + val) == "int", typeof(val + val)
     assert typeof(val - val) == "int", typeof(val - val)
     assert typeof(val & val) == "int", typeof(val & val)
     cdef int_return x = f(val + val)
-    return x.msg
+    return x.msg.decode('ASCII')
 
 def short_unnop(short val):
     """
     Arithmetic in C is always done with at least int precision.
     
 
 def short_unnop(short val):
     """
     Arithmetic in C is always done with at least int precision.
     
-    >>> short_unnop(3)
-    'int called'
+    >>> print(short_unnop(3))
+    int called
     """
     cdef int_return x = f(-val)
     """
     cdef int_return x = f(-val)
-    return x.msg
+    return x.msg.decode('ASCII')
 
 def longlong_binop(long long val):
     """
 
 def longlong_binop(long long val):
     """
-    >>> longlong_binop(3)
-    'long long called'
+    >>> print(longlong_binop(3))
+    long long called
     """
     cdef longlong_return x = f(val * val)
     """
     cdef longlong_return x = f(val * val)
-    return x.msg
+    return x.msg.decode('ASCII')
 
 def longlong_unnop(long long val):
     """
 
 def longlong_unnop(long long val):
     """
-    >>> longlong_unnop(3)
-    'long long called'
+    >>> print(longlong_unnop(3))
+    long long called
     """
     cdef longlong_return x = f(~val)
     """
     cdef longlong_return x = f(~val)
-    return x.msg
+    return x.msg.decode('ASCII')
 
 
 def test_bint(bint a):
 
 
 def test_bint(bint a):