void () { List<String> suggested = doTestByText(""" class C(object): def f(self): pass C().f.im_<caret>"""); assertNotNull(suggested); assertContainsElements(suggested, PyNames.LEGACY_METHOD_SPECIAL_ATTRIBUTES); suggested = doTestByText(""" class C(object): def f(self): pass C().f.__<caret>"""); assertNotNull(suggested); assertContainsElements(suggested, PyNames.METHOD_SPECIAL_ATTRIBUTES); final Set<String> functionAttributes = new HashSet<>(PyNames.FUNCTION_SPECIAL_ATTRIBUTES); functionAttributes.removeAll(PyNames.METHOD_SPECIAL_ATTRIBUTES); assertDoesntContain(suggested, functionAttributes); }