void () { runPythonTest(new IPythonTask() { @Override public void testing() throws Exception { waitForReady(); addTextToEditor("sys?"); ApplicationManager.getApplication().runReadAction(() -> { PsiFile psi = PsiDocumentManager.getInstance(getProject()) .getPsiFile(getConsoleView().getConsoleEditor().getDocument()); Assert.assertThat("No errors expected", getErrors(psi), Matchers.empty()); }); } }); }