make the test test something
authorStefan Behnel <scoder@users.berlios.de>
Wed, 9 Apr 2008 18:16:48 +0000 (20:16 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 9 Apr 2008 18:16:48 +0000 (20:16 +0200)
tests/run/pyextattrref.pyx

index 3f9261a90ec8ef3fd948c06828bc050e6db1f932..7ef36467319370eaf9d3e43e081e274fd6fabc21 100644 (file)
@@ -1,12 +1,22 @@
 __doc__ = """
-    >>> 
+    >>> s = Spam(Eggs("ham"))
+    >>> test(s)
+    'ham'
 """
 
 cdef class Eggs:
     cdef object ham
+    def __init__(self, ham):
+        self.ham = ham
 
 cdef class Spam:
     cdef Eggs eggs
+    def __init__(self, eggs):
+        self.eggs = eggs
 
-cdef void tomato(Spam s):
+cdef object tomato(Spam s):
     food = s.eggs.ham
+    return food
+
+def test(Spam s):
+    return tomato(s)