void () { CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance(); boolean oldStubOnEnter = codeInsightSettings.JAVADOC_STUB_ON_ENTER; codeInsightSettings.JAVADOC_STUB_ON_ENTER = true; PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(myFixture.getModule()); documentationSettings.setFormat(DocStringFormat.REST); try { doTest(); } finally { documentationSettings.setFormat(DocStringFormat.PLAIN); codeInsightSettings.JAVADOC_STUB_ON_ENTER = oldStubOnEnter; } }