Commit 81c90b1c authored by Stefan Behnel's avatar Stefan Behnel

Py3 test fix

parent c304a144
__doc__ = u""" __doc__ = u"""
>>> a = A() >>> a = A()
>>> a.foo() >>> a.foo()
(True, u'yo') (True, 'yo')
>>> a.foo(False) >>> a.foo(False)
(False, u'yo') (False, 'yo')
>>> a.foo(10, u'yes') >>> a.foo(10, 'yes')
(True, u'yes') (True, 'yes')
""" """
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u"u'", u"'")
cdef class A: cdef class A:
cpdef foo(self, bint a=True, b=u"yo"): cpdef foo(self, bint a=True, b="yo"):
return a, b return a, b
def call0(): def call0():
""" """
>>> call0() >>> call0()
(True, u'yo') (True, 'yo')
""" """
cdef A a = A() cdef A a = A()
return a.foo() return a.foo()
...@@ -29,7 +24,7 @@ def call0(): ...@@ -29,7 +24,7 @@ def call0():
def call1(): def call1():
""" """
>>> call1() >>> call1()
(False, u'yo') (False, 'yo')
""" """
cdef A a = A() cdef A a = A()
return a.foo(False) return a.foo(False)
...@@ -37,7 +32,7 @@ def call1(): ...@@ -37,7 +32,7 @@ def call1():
def call2(): def call2():
""" """
>>> call2() >>> call2()
(False, u'go') (False, 'go')
""" """
cdef A a = A() cdef A a = A()
return a.foo(False, u"go") return a.foo(False, "go")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment