test fixes
authorStefan Behnel <scoder@users.berlios.de>
Sun, 25 May 2008 13:36:51 +0000 (15:36 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 25 May 2008 13:36:51 +0000 (15:36 +0200)
tests/run/r_delgado_1.pyx
tests/run/r_lepage_3.pyx

index 4c98c13169d3f9c06a1525740a8541273c44cad7..e42fa6721df87d233667f998ada3fda7ce97c919 100644 (file)
@@ -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")
 
index a79318cff4507d6eda1ec0cf0aa1afcffb0815a8..93d6c9fbd713b571b01de62a4f6b2ce160bd9b7e 100644 (file)
@@ -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