From: Vitja Makarov Date: Wed, 30 Mar 2011 08:46:48 +0000 (+0200) Subject: Add testcase for cdef class method with closure X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee13f54f750f9713f649ddcd9c7318c08584e6b4;p=cython.git Add testcase for cdef class method with closure --- diff --git a/tests/run/closure_self.pyx b/tests/run/closure_self.pyx new file mode 100644 index 00000000..78c544e1 --- /dev/null +++ b/tests/run/closure_self.pyx @@ -0,0 +1,11 @@ +cdef class SelfInClosure(object): + """ + >>> o = SelfInClosure() + >>> o.closure_method()() == o + True + """ + + def closure_method(self): + def nested(): + return self + return nested