summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-01-19 18:27:33 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-01-19 18:27:33 +0100
commita638d8e440c40ebf8ef211f5bfffa3cb075f81c1 (patch)
treed7ba277d759f8b9ba2d652c2d8362e4b4bcf701c
parentffd5e670b9d18470be24d2dbf9b4f41c1e13372e (diff)
downloadlogilab-common-a638d8e440c40ebf8ef211f5bfffa3cb075f81c1.tar.gz
typo
-rw-r--r--ChangeLog2
-rw-r--r--test/input/func_noerror_decorator_scope.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fedda05..fc54f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -92,7 +92,7 @@ ChangeLog for logilab.common
- added assertDirEquals
- various failure ouput improvement
- * umessage: umessage.date() mayreturn unparsage string as is instead of None
+ * umessage: umessage.date() may return unparsable string as is instead of None
* compat: adds a max function taking 'key' as keyword argument as in 2.5
diff --git a/test/input/func_noerror_decorator_scope.py b/test/input/func_noerror_decorator_scope.py
new file mode 100644
index 0000000..1d21522
--- /dev/null
+++ b/test/input/func_noerror_decorator_scope.py
@@ -0,0 +1,16 @@
+"""Test that decorators sees the class namespace - just like
+function default values does but function body doesn't.
+
+https://www.logilab.net/elo/ticket/3711 - bug finding decorator arguments
+https://www.logilab.net/elo/ticket/5626 - name resolution bug inside classes
+"""
+
+class Test:
+
+ ident = lambda x: x
+
+ @ident(ident)
+ def f(self, val=ident(7), f=ident):
+ return f(val)
+
+print Test().f()