From 13e888fb1e4e4bf9242befaa6a53b90e52deacba Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 26 May 2008 18:58:03 +0200 Subject: [PATCH] simple test for extension class body --- tests/run/extclassbody.pyx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/run/extclassbody.pyx 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 -- 2.26.2