diff --git a/tests/run/r_delgado_1.pyx b/tests/run/r_delgado_1.pyx index 4c98c13169d3f9c06a1525740a8541273c44cad7..e42fa6721df87d233667f998ada3fda7ce97c919 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 a79318cff4507d6eda1ec0cf0aa1afcffb0815a8..93d6c9fbd713b571b01de62a4f6b2ce160bd9b7e 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