From: Stefan Behnel Date: Thu, 30 Dec 2010 00:14:22 +0000 (+0100) Subject: extended test case X-Git-Tag: 0.14.1rc0~35 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=559b027031183c09d0af36e46640b70daaf6cf12;p=cython.git extended test case --- diff --git a/tests/run/decorators_T593.pyx b/tests/run/decorators_T593.pyx index 71737d01..e9119ad2 100644 --- a/tests/run/decorators_T593.pyx +++ b/tests/run/decorators_T593.pyx @@ -10,6 +10,7 @@ def testme(func): return True except NameError: return False + @testme def am_i_buggy(): pass @@ -24,6 +25,30 @@ def testclass(klass): class Foo: pass + +def called_deco(a,b,c): + def count(f): + a.append( (b,c) ) + return f + return count + +L = [] + +@called_deco(L, 5, c=6) +@called_deco(L, c=3, b=4) +@called_deco(L, 1, 2) +def wrapped_func(x): + """ + >>> L + [(1, 2), (4, 3), (5, 6)] + >>> wrapped_func(99) + 99 + >>> L + [(1, 2), (4, 3), (5, 6)] + """ + return x + + def class_in_closure(x): """ >>> C1, c0 = class_in_closure(5)