void () { myFixture.configureByFile(getTestName(true) + ".py"); boolean inplaceEnabled = myFixture.getEditor().getSettings().isVariableInplaceRenameEnabled(); try { myFixture.getEditor().getSettings().setVariableInplaceRenameEnabled(true); IntroduceHandler handler = createHandler(); final IntroduceOperation operation = new IntroduceOperation(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), "a_"); operation.setReplaceAll(true); handler.performAction(operation); myFixture.checkResultByFile(getTestName(true) + ".after.py"); } finally { myFixture.getEditor().getSettings().setVariableInplaceRenameEnabled(inplaceEnabled); } }