Commit ab6a352b authored by Stefan Behnel's avatar Stefan Behnel

test fixes

parent afc2a0ab
__doc__ = u""" __doc__ = u"""
try: >>> try:
eggs().eat() ... eggs().eat()
except RuntimeError, e: ... except RuntimeError:
print "%s: %s" % (e.__class__.__name__, e) ... import sys
... e = sys.exc_info()[1]
... print("%s: %s" % (e.__class__.__name__, e))
RuntimeError: I don't like that
""" """
cdef class eggs: cdef class eggs:
...@@ -11,5 +14,5 @@ cdef class eggs: ...@@ -11,5 +14,5 @@ cdef class eggs:
pass pass
def eat(self): def eat(self):
raise RuntimeError("I don't like that") raise RuntimeError(u"I don't like that")
__doc__ = u""" __doc__ = u"""
g = r_lepage_3.Grail() >>> g = Grail()
g("spam", 42, ["tomato", "sandwich"]) >>> g("spam", 42, ["tomato", "sandwich"])
Grail called with: spam 42 ['tomato', 'sandwich']
""" """
cdef class Grail: cdef class Grail:
def __call__(self, x, y, z): def __call__(self, x, y, z):
print "Grail called with:", x, y, z print u"Grail called with:", x, y, z
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