void (String newName, String expectedConflict) { myFixture.configureByFile(RENAME_DATA_PATH + getTestName(true) + ".py"); try { myFixture.renameElementAtCaret(newName); } catch (BaseRefactoringProcessor.ConflictsInTestsException ex) { assertEquals(expectedConflict, ex.getMessage()); return; } fail("Expected conflict not reported"); }