From a5fa0708eeea41cbde8dbc69f3a7aea16c66beb6 Mon Sep 17 00:00:00 2001 From: David Halter Date: Fri, 9 Aug 2013 12:36:45 +0430 Subject: [PATCH] tests for #272, not existing method decorators in combination with super on __init__ --- test/completion/decorators.py | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/test/completion/decorators.py b/test/completion/decorators.py index 701b8271..a15f8c5b 100644 --- a/test/completion/decorators.py +++ b/test/completion/decorators.py @@ -175,6 +175,34 @@ MethodDecorators().class_var() #? str() MethodDecorators().method_var() + +class Base(): + @not_existing + def __init__(self): + pass + @not_existing + def b(self): + return '' + @dec + def c(self): + return 1 + +class MethodDecoratorDoesntExist(Base): + """#272 github: combination of method decorators and super()""" + def a(self): + #? + super().__init__() + #? + super().b() + #? int() + super().c() + #? + self.d() + + @doesnt_exist + def d(self): + return 1.0 + # ----------------- # others # ----------------- @@ -201,5 +229,9 @@ follow_statement(1) # class decorators should just be ignored @should_ignore -class A(): pass +class A(): + def ret(self): + return 1 +#? int() +A().ret()