void () { prepareTestDirectory(); final PyCustomMember customMember = new PyCustomMember("Clazz").resolvesToClass("pkg.mod1.Clazz"); final PsiFile context = myFixture.configureByText("a.py", ""); final TypeEvalContext typeEvalContext = TypeEvalContext.codeAnalysis(myFixture.getProject(), context); final PyResolveContext resolveContext = PyResolveContext.defaultContext(typeEvalContext); final PsiElement resolved = customMember.resolve(context, resolveContext); assertInstanceOf(resolved, PyTypedElement.class); final PyType type = typeEvalContext.getType((PyTypedElement)resolved); assertInstanceOf(type, PyClassType.class); }