diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 22:20:00 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-07 22:59:36 +0100 |
commit | f84bf0220812a987595f719acad0be6e8cf0f982 (patch) | |
tree | a7c96e0322a8b38af55b34e57e33105528b61fb8 /tests/functional/d | |
parent | 48d366855759b612cc883409997ba161afe09095 (diff) | |
download | pylint-git-f84bf0220812a987595f719acad0be6e8cf0f982.tar.gz |
Migrate all func_noerror_* to new functional tests
Diffstat (limited to 'tests/functional/d')
-rw-r--r-- | tests/functional/d/decorator_scope.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/functional/d/decorator_scope.py b/tests/functional/d/decorator_scope.py new file mode 100644 index 000000000..8d35159e9 --- /dev/null +++ b/tests/functional/d/decorator_scope.py @@ -0,0 +1,19 @@ +# -*- pylint: disable=W0232,R0903, useless-object-inheritance +"""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 +""" + +from __future__ import print_function + +class Test(object): + """test class""" + ident = lambda x: x + + @ident(ident) + def method(self, val=ident(7), func=ident): + """hop""" + print(self) + return func(val) |