void () { myFixture.copyDirectoryToProject("resolve/" + getTestName(false), ""); final PyTargetExpression target = assertResolvesTo(PyTargetExpression.class, "some_attr"); final PsiFile file = myFixture.getFile(); final TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), file); final PyResolveContext resolveContext = PyResolveContext.defaultContext(context); // It's like an attempt to find type annotation for attribute on the class level. final PyClassTypeImpl classType = new PyClassTypeImpl(target.getContainingClass(), true); assertEmpty(classType.resolveMember(target.getReferencedName(), target, AccessDirection.READ, resolveContext, true)); assertProjectFilesNotParsed(file); assertSdkRootsNotParsed(file); }