void (@NotNull String name, boolean hasDefault, boolean hasDefaultFactory, boolean initValue) { final TypeEvalContext context = TypeEvalContext.codeInsightFallback(myClass.getProject()); final PyTargetExpression field = myClass.findClassAttribute(name, false, context); final PyDataclassFieldStub fieldStub = field.getStub().getCustomStub(PyDataclassFieldStub.class); assertNotNull(fieldStub); assertEquals(hasDefault, fieldStub.hasDefault()); assertEquals(hasDefaultFactory, fieldStub.hasDefaultFactory()); assertEquals(initValue, fieldStub.initValue()); }