void () { myFixture.copyDirectoryToProject(TEST_DIRECTORY + getTestName(false), ""); @Nullable PyExpression expr = parseExpr(""" from mod import MyEnum expr = MyEnum['ONE'].value"""); assertNotNull(expr); TypeEvalContext codeAnalysisContext = TypeEvalContext.codeAnalysis(expr.getProject(), expr.getContainingFile()); assertType("Any", expr, codeAnalysisContext); assertProjectFilesNotParsed(codeAnalysisContext); TypeEvalContext userInitiatedContext = TypeEvalContext.userInitiated(expr.getProject(), expr.getContainingFile()); assertType("int", expr, userInitiatedContext); assertProjectFilesNotParsed(userInitiatedContext); }