summaryrefslogtreecommitdiff
path: root/pylint/test/functional/arguments.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/test/functional/arguments.py')
-rw-r--r--pylint/test/functional/arguments.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pylint/test/functional/arguments.py b/pylint/test/functional/arguments.py
index 8f06ffe..a589af4 100644
--- a/pylint/test/functional/arguments.py
+++ b/pylint/test/functional/arguments.py
@@ -122,3 +122,15 @@ class TypeCheckConstructor(object):
type(self)(1, lala=2) # [no-value-for-parameter,unexpected-keyword-arg]
type(self)(1, 2)
type(self)(first=1, second=2)
+
+
+class Test(object):
+ """ lambda needs Test instance as first argument """
+ lam = lambda self, icon: (self, icon)
+
+ def test(self):
+ self.lam(42)
+ self.lam() # [no-value-for-parameter]
+ self.lam(1, 2, 3) # [too-many-function-args]
+
+Test().lam() # [no-value-for-parameter]