void (@NotNull String expectedType) { myFixture.copyDirectoryToProject(getTestName(false), ""); myFixture.configureByFile("main.py"); final PyExpression expr = myFixture.findElementByText("expr", PyExpression.class); final TypeEvalContext codeAnalysis = TypeEvalContext.codeAnalysis(expr.getProject(), expr.getContainingFile()); assertType("Failed in code analysis context", expectedType, expr, codeAnalysis); assertProjectFilesNotParsed(expr.getContainingFile()); final TypeEvalContext userInitiated = TypeEvalContext.userInitiated(expr.getProject(), expr.getContainingFile()).withTracing(); assertType("Failed in user initiated context", expectedType, expr, userInitiated); }