Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/pydantic/pydantic
/ MyModel
Class
MyModel
tests/test_construction.py:81–82 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
79
80
def
test_construct_with_aliases():
81
class
MyModel(BaseModel):
82
x: int = Field(alias=
'x_alias'
)
83
84
my_model = MyModel.model_construct(x_alias=1)
85
assert my_model.x == 1
Callers
nothing calls this directly
Calls
3
Field
Function · 0.90
AliasChoices
Class · 0.90
AliasPath
Class · 0.90
Tested by
no test coverage detected