def test_generic_field():
    """Test for https://github.com/pydantic/pydantic/issues/10039.

    This was originally fixed by defining a custom MRO for Pydantic models,
    but the fix from https://github.com/pydantic/pydantic/pull/10666 seemed
    better. Test is still kept for historical purposes.
    """

    T = TypeVar('T')

    class A(BaseModel, Generic[T]): ...

    class B(A[T]): ...

    class C(B[bool]): ...

    class Model(BaseModel):
        input_bool: A[bool]

    Model(input_bool=C())
Test for https://github.com/pydantic/pydantic/issues/10039.

    This was originally fixed by defining a custom MRO for Pydantic models,
    but the fix from https://github.com/pydantic/pydantic/pull/10666 seemed
    better. Test is still kept for historical purposes.
    
tests/test_generics.py