MCPcopy
hub / github.com/pydantic/pydantic / Foo

Class Foo

tests/test_config.py:546–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544@pytest.mark.skipif(sys.version_info < (3, 11), reason='requires backport pre 3.11, fully tested in pydantic core')
545def 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:

Calls

no outgoing calls