MCPcopy
hub / github.com/pydantic/pydantic / Model

Class Model

tests/test_main.py:59–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57def test_success():
58 # same as below but defined here so class definition occurs inside the test
59 class Model(BaseModel):
60 a: float
61 b: int = 10
62
63 m = Model(a=10.2)
64 assert m.a == 10.2

Calls 6

FieldFunction · 0.90
ConfigDictClass · 0.90
PrivateAttrFunction · 0.90
AfterValidatorClass · 0.90
StringConstraintsClass · 0.90
SubClass · 0.70

Tested by 15

test_successFunction · 0.56
test_not_requiredFunction · 0.56
test_allow_extraFunction · 0.56
test_allow_extra_reprFunction · 0.56
test_extra_allowedFunction · 0.56
test_extra_ignoredFunction · 0.56