Commit f84705a3 authored by Stefan Behnel's avatar Stefan Behnel

test fixes

parent a5cc7572
......@@ -68,10 +68,10 @@ __doc__ = ur"""
'with_doc_4(int a, str b, list c) -> str\n\n Existing string\n '
>>> f_sd.__doc__
"f_sd(str s=u'spam')"
"f_sd(str s='spam')"
>>> cf_sd.__doc__
"cf_sd(str s=u'spam') -> str"
"cf_sd(str s='spam') -> str"
>>> types.__doc__
'types(Ext a, int b, unsigned short c, float d, e)'
......@@ -219,10 +219,10 @@ cpdef str with_doc_4(int a, str b, list c):
"""
return b
def f_sd(str s=u'spam'):
def f_sd(str s='spam'):
return s
cpdef str cf_sd(str s=u'spam'):
cpdef str cf_sd(str s='spam'):
return s
cpdef char f_c(char c):
......
......@@ -23,7 +23,7 @@ def simple():
b = b"abc"
assert typeof(b) == "char *", typeof(b)
s = "abc"
assert typeof(s) == "Python object", typeof(s)
assert typeof(s) == "str object", typeof(s)
u = u"xyz"
assert typeof(u) == "unicode object", typeof(u)
L = [1,2,3]
......
......@@ -52,13 +52,13 @@ def slice_list_assign(list l, value):
def slice_charp(py_string_arg):
cdef str py_string = py_string_arg.encode(u'ASCII')
cdef bytes py_string = py_string_arg.encode(u'ASCII')
cdef char* s = py_string
return s[1:3].decode(u'ASCII')
def slice_charp_repeat(py_string_arg):
cdef str py_string = py_string_arg.encode(u'ASCII')
cdef bytes py_string = py_string_arg.encode(u'ASCII')
cdef char* s = py_string
cdef str slice_val = s[1:6]
cdef bytes slice_val = s[1:6]
s = slice_val
return s[1:3].decode(u'ASCII')
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