void () { runWithLanguageLevel(LanguageLevel.PYTHON27, () -> { List<String> suggested = doTestByText("def func(): pass; func.func_<caret>"); assertNotNull(suggested); assertContainsElements(suggested, PyNames.LEGACY_FUNCTION_SPECIAL_ATTRIBUTES); suggested = doTestByText("def func(): pass; func.__<caret>"); assertNotNull(suggested); assertContainsElements(suggested, PyNames.FUNCTION_SPECIAL_ATTRIBUTES); assertDoesntContain(suggested, PyNames.PY3_ONLY_FUNCTION_SPECIAL_ATTRIBUTES); }); }