test_decorator_with_specified_schema_pydantic_v1() — langchain Function Reference
Architecture documentation for the test_decorator_with_specified_schema_pydantic_v1() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD bff8bba1_7077_8e17_c742_aacc688e1b67["test_decorator_with_specified_schema_pydantic_v1()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] bff8bba1_7077_8e17_c742_aacc688e1b67 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style bff8bba1_7077_8e17_c742_aacc688e1b67 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 215–230
def test_decorator_with_specified_schema_pydantic_v1() -> None:
"""Test that manually specified schemata are passed through to the tool."""
class _MockSchemaV1(BaseModelV1):
"""Return the arguments directly."""
arg1: int
arg2: bool
arg3: dict | None = None
@tool(args_schema=cast("ArgsSchema", _MockSchemaV1))
def tool_func_v1(*, arg1: int, arg2: bool, arg3: dict | None = None) -> str:
return f"{arg1} {arg2} {arg3}"
assert isinstance(tool_func_v1, BaseTool)
assert tool_func_v1.args_schema == cast("ArgsSchema", _MockSchemaV1)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_decorator_with_specified_schema_pydantic_v1() do?
test_decorator_with_specified_schema_pydantic_v1() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_decorator_with_specified_schema_pydantic_v1() defined?
test_decorator_with_specified_schema_pydantic_v1() is defined in libs/core/tests/unit_tests/test_tools.py at line 215.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free