void () { myFixture.enableInspections(new RegExpRedundantEscapeInspection()); myFixture.configureByText(PythonFileType.INSTANCE, """ import re re.compile("(?P<foo>" "((<caret>\\/(?P<bar>.+))?))")"""); final List<IntentionAction> quickFixes = myFixture.getAllQuickFixes(); assertEquals(1, quickFixes.size()); final IntentionAction removeRedundantEscapeFix = quickFixes.get(0); assertEquals("Remove redundant escape", removeRedundantEscapeFix.getText()); myFixture.launchAction(removeRedundantEscapeFix); myFixture.checkResult(""" import re re.compile("(?P<foo>" "((/(?P<bar>.+))?))")"""); }