From: Stefan Behnel Date: Wed, 9 Apr 2008 18:16:48 +0000 (+0200) Subject: make the test test something X-Git-Tag: 0.9.6.14~20^2~33 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=635a3949ec8c23b142fa6a4e38cd4403acc45729;p=cython.git make the test test something --- diff --git a/tests/run/pyextattrref.pyx b/tests/run/pyextattrref.pyx index 3f9261a9..7ef36467 100644 --- a/tests/run/pyextattrref.pyx +++ b/tests/run/pyextattrref.pyx @@ -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)