void (@NotNull String expectedName, @NotNull List<String> expectedFieldsNames, @NotNull List<String> expectedFieldsTypes, @NotNull QualifiedName expectedCalleeName) { final PyFile file = getTestFile(); final PyTargetExpression attribute = file.findTopLevelAttribute("nt"); assertNotNull(attribute); final PyNamedTupleStub stub = attribute.getStub().getCustomStub(PyNamedTupleStub.class); assertNotNull(stub); assertEquals(expectedCalleeName, stub.getCalleeName()); final PyType typeFromStub = TypeEvalContext.codeInsightFallback(myFixture.getProject()).getType(attribute); doTestNamedTuple(expectedName, expectedFieldsNames, expectedFieldsTypes, typeFromStub); assertNotParsed(file); final FileASTNode astNode = file.getNode(); assertNotNull(astNode); final PyType typeFromAst = TypeEvalContext.userInitiated(myFixture.getProject(), file).getType(attribute); doTestNamedTuple(expectedName, expectedFieldsNames, expectedFieldsTypes, typeFromAst); }