void () { boolean savedValue = CodeInsightSettings.getInstance().TAB_EXITS_BRACKETS_AND_QUOTES; CodeInsightSettings.getInstance().TAB_EXITS_BRACKETS_AND_QUOTES = true; try { myFixture.configureByText(getTestName(true) + ".py", "def some():\n" + " print<caret>"); myFixture.type("(\""); myFixture.performEditorAction(IdeActions.ACTION_BRACE_OR_QUOTE_OUT); myFixture.checkResult("def some():\n" + " print(\"\"<caret>)"); myFixture.performEditorAction(IdeActions.ACTION_BRACE_OR_QUOTE_OUT); myFixture.checkResult("def some():\n" + " print(\"\")<caret>"); } finally { CodeInsightSettings.getInstance().TAB_EXITS_BRACKETS_AND_QUOTES = savedValue; } }