void (String newName) { final String testName = getTestName(false); final String beforeName = testName + ".before.py"; final String afterName = testName + ".after.py"; final String dir = "refactoring/extractmethod/"; myFixture.configureByFile(dir + beforeName); final RefactoringSupportProvider provider = LanguageRefactoringSupport.INSTANCE.forLanguage(PythonLanguage.getInstance()); assertNotNull(provider); final RefactoringActionHandler handler = provider.getExtractMethodHandler(); assertNotNull(handler); System.setProperty(PyExtractMethodUtil.NAME, newName); try { refactorUsingHandler(handler); } finally { System.clearProperty(PyExtractMethodUtil.NAME); } myFixture.checkResultByFile(dir + afterName); }