void () { final List<String> inClassMethod = doTestByText(""" class First: def foo(self): print(__cl<caret>)"""); assertNotNull(inClassMethod); assertDoesntContain(inClassMethod, PyNames.__CLASS__); final List<String> inStaticMethod = doTestByText(""" class First: @staticmethod def foo(): print(__cl<caret>)"""); assertNotNull(inStaticMethod); assertDoesntContain(inStaticMethod, PyNames.__CLASS__); final List<String> inClass = doTestByText("class First:\n" + " print(__cl<caret>)"); assertNotNull(inClass); assertEmpty(inClass); final List<String> inFunction = doTestByText("def abc():\n" + " print(__cl<caret>)"); assertNotNull(inFunction); assertEmpty(inClass); }