void () { // PY-670 myFixture.configureByFile(RENAME_DATA_PATH + getTestName(true) + ".py"); final PsiElement element = TargetElementUtil.findTargetElement(myFixture.getEditor(), TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED | TargetElementUtil.ELEMENT_NAME_ACCEPTED); assertNotNull(element); myFixture.renameElement(element, "bar", true, false); myFixture.checkResultByFile(RENAME_DATA_PATH + getTestName(true) + "_after.py"); }