From f84705a3b098ec89b9bc513540a352b9294ee455 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 10 Oct 2009 17:06:02 +0200 Subject: [PATCH] test fixes --- tests/run/embedsignatures.pyx | 8 ++++---- tests/run/type_inference.pyx | 2 +- tests/run/typed_slice.pyx | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/run/embedsignatures.pyx b/tests/run/embedsignatures.pyx index 16590c53..2f24f723 100644 --- a/tests/run/embedsignatures.pyx +++ b/tests/run/embedsignatures.pyx @@ -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): diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx index 7f9aa69d..f8ec4521 100644 --- a/tests/run/type_inference.pyx +++ b/tests/run/type_inference.pyx @@ -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] diff --git a/tests/run/typed_slice.pyx b/tests/run/typed_slice.pyx index 4b15097e..c5301014 100644 --- a/tests/run/typed_slice.pyx +++ b/tests/run/typed_slice.pyx @@ -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') -- 2.26.2