def test_arbitrary_types_not_a_type() -> None:
    """https://github.com/pydantic/pydantic/issues/6477"""

    class Foo:
        pass

    class Bar:
        pass

    with pytest.warns(UserWarning, match='is not a Python type'):
        ta = TypeAdapter(Foo(), config=ConfigDict(arbitrary_types_allowed=True))

    bar = Bar()
    assert ta.validate_python(bar) is bar
https://github.com/pydantic/pydantic/issues/6477
tests/test_main.py