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