void () { final PyFile file = getTestFile("typingNewType/new_type.py"); final PyTargetExpression type = file.findTopLevelAttribute("UserId"); final PyTypingNewTypeStub stub = type.getStub().getCustomStub(PyTypingNewTypeStub.class); assertNotNull(stub); assertEquals("UserId", stub.getName()); assertEquals("int", stub.getClassType()); final TypeEvalContext context = TypeEvalContext.codeInsightFallback(myFixture.getProject()); final PyType typeDef = context.getType(type); assertTrue(typeDef instanceof PyTypingNewType); assertNotParsed(file); }