MCPcopy
hub / github.com/pydantic/pydantic / test_model_property_attribute_error

Function test_model_property_attribute_error

tests/test_main.py:360–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358
359
360def test_model_property_attribute_error():
361 class Model(BaseModel):
362 @property
363 def a_property(self):
364 raise AttributeError('Internal Error')
365
366 with pytest.raises(AttributeError, match='Internal Error'):
367 Model().a_property
368
369
370def test_extra_allowed():

Callers

nothing calls this directly

Calls 1

ModelClass · 0.70

Tested by

no test coverage detected