void (@NotNull String expectedType) { myFixture.copyDirectoryToProject("pyi/type/" + getTestName(true), ""); PsiDocumentManager.getInstance(myFixture.getProject()).commitAllDocuments(); final String fileName = getTestName(false) + ".py"; final var file = myFixture.configureByFile(fileName); final PsiElement element = myFixture.getElementAtCaret(); assertInstanceOf(element, PyTypedElement.class); final PyTypedElement typedElement = (PyTypedElement)element; final Project project = element.getProject(); assertType(expectedType, typedElement, TypeEvalContext.codeAnalysis(project, file)); assertProjectFilesNotParsed(file); assertType(expectedType, typedElement, TypeEvalContext.userInitiated(project, file)); }