From 559b027031183c09d0af36e46640b70daaf6cf12 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 30 Dec 2010 01:14:22 +0100 Subject: [PATCH] extended test case --- tests/run/decorators_T593.pyx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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) -- 2.26.2