From: Stefan Behnel Date: Thu, 12 Jun 2008 07:21:21 +0000 (+0200) Subject: Py3 test fix X-Git-Tag: 0.9.8.1~137^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=59cbd0ad3d46c3f5a3d4abc54d42186209018fca;p=cython.git Py3 test fix --- diff --git a/tests/run/classbody_exec.pyx b/tests/run/classbody_exec.pyx index 3731e6e4..c89c7f9d 100644 --- a/tests/run/classbody_exec.pyx +++ b/tests/run/classbody_exec.pyx @@ -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)