MCPcopy
hub / github.com/pydantic/pydantic / test_validate_all

Function test_validate_all

tests/test_validators.py:873–882  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

871
872
873def test_validate_all():
874 class MyModel(BaseModel):
875 x: int
876
877 @field_validator('*')
878 @classmethod
879 def validate_all(cls, v: Any):
880 return v * 2
881
882 assert MyModel(x=10).x == 20
883
884
885def test_validate_child_all():

Callers

nothing calls this directly

Calls 1

MyModelClass · 0.70

Tested by

no test coverage detected