diff options
Diffstat (limited to 'tests/functional/n/no')
-rw-r--r-- | tests/functional/n/no/no_self_argument.py | 18 | ||||
-rw-r--r-- | tests/functional/n/no/no_self_argument.txt | 2 |
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" |