| 544 | @pytest.mark.skipif(sys.version_info < (3, 11), reason='requires backport pre 3.11, fully tested in pydantic core') |
| 545 | def test_config_validation_error_cause(): |
| 546 | class Foo(BaseModel): |
| 547 | foo: int |
| 548 | |
| 549 | @field_validator('foo') |
| 550 | def check_foo(cls, v): |
| 551 | assert v > 5, 'Must be greater than 5' |
| 552 | |
| 553 | # Should be disabled by default: |
| 554 | with pytest.raises(ValidationError) as exc_info: |
no outgoing calls