From: Stefan Behnel Date: Sun, 25 May 2008 13:36:51 +0000 (+0200) Subject: test fixes X-Git-Tag: 0.9.8rc1~11^2~10^2~15^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab6a352bd858572d2f0fefe47d7168d7b2be634e;p=cython.git test fixes --- diff --git a/tests/run/r_delgado_1.pyx b/tests/run/r_delgado_1.pyx index 4c98c131..e42fa672 100644 --- a/tests/run/r_delgado_1.pyx +++ b/tests/run/r_delgado_1.pyx @@ -1,8 +1,11 @@ __doc__ = u""" -try: - eggs().eat() -except RuntimeError, e: - print "%s: %s" % (e.__class__.__name__, e) +>>> try: +... eggs().eat() +... except RuntimeError: +... import sys +... e = sys.exc_info()[1] +... print("%s: %s" % (e.__class__.__name__, e)) +RuntimeError: I don't like that """ cdef class eggs: @@ -11,5 +14,5 @@ cdef class eggs: pass def eat(self): - raise RuntimeError("I don't like that") + raise RuntimeError(u"I don't like that") diff --git a/tests/run/r_lepage_3.pyx b/tests/run/r_lepage_3.pyx index a79318cf..93d6c9fb 100644 --- a/tests/run/r_lepage_3.pyx +++ b/tests/run/r_lepage_3.pyx @@ -1,9 +1,10 @@ __doc__ = u""" -g = r_lepage_3.Grail() -g("spam", 42, ["tomato", "sandwich"]) +>>> g = Grail() +>>> g("spam", 42, ["tomato", "sandwich"]) +Grail called with: spam 42 ['tomato', 'sandwich'] """ cdef class Grail: def __call__(self, x, y, z): - print "Grail called with:", x, y, z + print u"Grail called with:", x, y, z