diff options
Diffstat (limited to 'pylint/test/input/func_noerror_function_as_method.py')
-rw-r--r-- | pylint/test/input/func_noerror_function_as_method.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pylint/test/input/func_noerror_function_as_method.py b/pylint/test/input/func_noerror_function_as_method.py new file mode 100644 index 0000000..e59fb5c --- /dev/null +++ b/pylint/test/input/func_noerror_function_as_method.py @@ -0,0 +1,18 @@ +# pylint: disable=R0903, print-statement +'''Test that a function is considered a method when looked up through a class. +''' +__revision__ = 1 + +class Clazz(object): + 'test class' + + def __init__(self, value): + self.value = value + +def func(arg1, arg2): + 'function that will be used as a method' + return arg1.value + arg2 + +Clazz.method = func + +print Clazz(1).method(2) |