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