mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-19 09:30:15 +00:00
[chore]: Added Tests
This commit is contained in:
parent
23ade9a1dc
commit
099ed443f3
@ -2702,3 +2702,12 @@ def test_tool_invoke_does_not_mutate_inputs() -> None:
|
|||||||
"id": "call_0_82c17db8-95df-452f-a4c2-03f809022134",
|
"id": "call_0_82c17db8-95df-452f-a4c2-03f809022134",
|
||||||
"type": "tool_call",
|
"type": "tool_call",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.filterwarnings("error")
|
||||||
|
def test_get_all_basemodel_annotations_warning() -> None:
|
||||||
|
class ModelWithAlias(BaseModel):
|
||||||
|
field_with_alias: str = Field(alias="alias_field")
|
||||||
|
|
||||||
|
with pytest.warns(UserWarning, match="Field 'field_with_alias' has alias 'alias_field'. The alias will be used instead of the field name."):
|
||||||
|
get_all_basemodel_annotations(ModelWithAlias)
|
||||||
|
Loading…
Reference in New Issue
Block a user