Py3 test fix
authorStefan Behnel <scoder@users.berlios.de>
Thu, 12 Jun 2008 07:21:21 +0000 (09:21 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 12 Jun 2008 07:21:21 +0000 (09:21 +0200)
tests/run/classbody_exec.pyx

index 3731e6e4aa2d6e78baa4967e00c139f7d82eacb5..c89c7f9dea4bbf18e0af3ad7ddc2a52082908cb2 100644 (file)
@@ -1,8 +1,12 @@
 __doc__ = u"""
-    >>> print D
-    {'answer': (42, 42)}
+    >>> print(D)
+    {u'answer': (42, 42)}
 """
 
+import sys
+if sys.version_info[0] >= 3:
+    __doc__ = __doc__.replace(u"u'", u"'")
+
 D = {}
 
 def foo(x):
@@ -10,4 +14,4 @@ def foo(x):
 
 cdef class Spam:
     answer = 42
-    D['answer'] = foo(answer)
+    D[u'answer'] = foo(answer)