From 9dfe25f6915d336f9b5acb9a08dd8fb05bbf7194 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 10 Oct 2009 11:39:28 +0200 Subject: [PATCH] test fixes --- tests/run/ct_DEF.pyx | 2 +- tests/run/type_inference.pyx | 18 ++++++++++-------- tests/run/varargdecl.pyx | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/run/ct_DEF.pyx b/tests/run/ct_DEF.pyx index 1f64106e..a06eccbb 100644 --- a/tests/run/ct_DEF.pyx +++ b/tests/run/ct_DEF.pyx @@ -41,7 +41,7 @@ DEF INT2 = 0x42 DEF INT3 = -0x42 DEF LONG = 666L DEF FLOAT = 12.5 -DEF STR = "spam" +DEF STR = b"spam" DEF TWO = TUPLE[1] DEF FIVE = TWO + 3 DEF TRUE = TRUE_FALSE[0] diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx index 1ca2c5d9..7f9aa69d 100644 --- a/tests/run/type_inference.pyx +++ b/tests/run/type_inference.pyx @@ -13,21 +13,23 @@ from cython cimport typeof def simple(): i = 3 - assert typeof(i) == "long" + assert typeof(i) == "long", typeof(i) x = 1.41 - assert typeof(x) == "double" + assert typeof(x) == "double", typeof(x) xptr = &x - assert typeof(xptr) == "double *" + assert typeof(xptr) == "double *", typeof(xptr) xptrptr = &xptr - assert typeof(xptrptr) == "double **" + assert typeof(xptrptr) == "double **", typeof(xptrptr) + b = b"abc" + assert typeof(b) == "char *", typeof(b) s = "abc" - assert typeof(s) == "char *" + assert typeof(s) == "Python object", typeof(s) u = u"xyz" - assert typeof(u) == "unicode object" + assert typeof(u) == "unicode object", typeof(u) L = [1,2,3] - assert typeof(L) == "list object" + assert typeof(L) == "list object", typeof(L) t = (4,5,6) - assert typeof(t) == "tuple object" + assert typeof(t) == "tuple object", typeof(t) def multiple_assignments(): a = 3 diff --git a/tests/run/varargdecl.pyx b/tests/run/varargdecl.pyx index c59a0d16..9e624cdf 100644 --- a/tests/run/varargdecl.pyx +++ b/tests/run/varargdecl.pyx @@ -6,5 +6,5 @@ cdef grail(char *blarg, ...): pass def test(): - grail("test") - grail("test", "toast") + grail(b"test") + grail(b"test", b"toast") -- 2.26.2