MCPcopy
hub / github.com/pydantic/pydantic / MyModel

Class MyModel

tests/test_json_schema.py:447–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445
446def test_invalid_json_schema_extra():
447 class MyModel(BaseModel):
448 model_config = ConfigDict(json_schema_extra=1)
449
450 name: str
451
452 with pytest.raises(
453 ValueError, match=re.escape("model_config['json_schema_extra']=1 should be a dict, callable, or None")

Callers

nothing calls this directly

Calls 3

ConfigDictClass · 0.90
StringConstraintsClass · 0.90
FieldFunction · 0.90

Tested by

no test coverage detected