From: Stefan Behnel Date: Mon, 26 May 2008 16:58:03 +0000 (+0200) Subject: simple test for extension class body X-Git-Tag: 0.9.8rc1~11^2~10^2~15^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13e888fb1e4e4bf9242befaa6a53b90e52deacba;p=cython.git simple test for extension class body --- diff --git a/tests/run/extclassbody.pyx b/tests/run/extclassbody.pyx new file mode 100644 index 00000000..7f233b98 --- /dev/null +++ b/tests/run/extclassbody.pyx @@ -0,0 +1,18 @@ +__doc__ = u""" +>>> s = Spam() +>>> s.a +1 +>>> s.c +3 +>>> s.test(5) +8 +>>> s.b +3 +""" + +cdef class Spam: + a = 1 + def test(self, a): + return a + self.c + b = a + 2 + c = 3