From 59cbd0ad3d46c3f5a3d4abc54d42186209018fca Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 12 Jun 2008 09:21:21 +0200 Subject: [PATCH] Py3 test fix --- tests/run/classbody_exec.pyx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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) -- 2.26.2