summaryrefslogtreecommitdiff
path: root/tests/functional/n
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 21:12:22 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 22:59:36 +0100
commitb16d72f8184c4352052b984acffaa1ab42dd5fa7 (patch)
treed37151fc6ebaf861763fbc53708db3e764ace78d /tests/functional/n
parent7114fa72ee425bba2524d5ccbe67d0ae84ed9284 (diff)
downloadpylint-git-b16d72f8184c4352052b984acffaa1ab42dd5fa7.tar.gz
Migrate func_e0204.py to new functional tests
Diffstat (limited to 'tests/functional/n')
-rw-r--r--tests/functional/n/no/no_self_argument.py18
-rw-r--r--tests/functional/n/no/no_self_argument.txt2
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/n/no/no_self_argument.py b/tests/functional/n/no/no_self_argument.py
new file mode 100644
index 000000000..38f6040b5
--- /dev/null
+++ b/tests/functional/n/no/no_self_argument.py
@@ -0,0 +1,18 @@
+"""Check for method without self as first argument"""
+# pylint: disable=useless-object-inheritance
+from __future__ import print_function
+
+class NoSelfArgument(object):
+ """dummy class"""
+
+ def __init__(truc): # [no-self-argument]
+ """method without self"""
+ print(1)
+
+ def abdc(yoo): # [no-self-argument]
+ """another test"""
+ print(yoo)
+
+ def edf(self):
+ """just another method"""
+ print('yapudju in', self)
diff --git a/tests/functional/n/no/no_self_argument.txt b/tests/functional/n/no/no_self_argument.txt
new file mode 100644
index 000000000..7e11c5ced
--- /dev/null
+++ b/tests/functional/n/no/no_self_argument.txt
@@ -0,0 +1,2 @@
+no-self-argument:8:4:NoSelfArgument.__init__:"Method should have ""self"" as first argument"
+no-self-argument:12:4:NoSelfArgument.abdc:"Method should have ""self"" as first argument"