projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4dd9bb
)
extended test case
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 30 Dec 2010 00:14:22 +0000
(
01:14
+0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 30 Dec 2010 00:14:22 +0000
(
01:14
+0100)
tests/run/decorators_T593.pyx
patch
|
blob
|
history
diff --git
a/tests/run/decorators_T593.pyx
b/tests/run/decorators_T593.pyx
index 71737d01fde78d921bdccb279db018e1ed2a8946..e9119ad23692af701168b2f2b74380254754f491 100644
(file)
--- 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)