Home / Function/ test_decorator_with_specified_schema() — langchain Function Reference

test_decorator_with_specified_schema() — langchain Function Reference

Architecture documentation for the test_decorator_with_specified_schema() function in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3b186570_abc0_3794_3f27_18345aabbc6d["test_decorator_with_specified_schema()"]
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  3b186570_abc0_3794_3f27_18345aabbc6d -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  style 3b186570_abc0_3794_3f27_18345aabbc6d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 200–208

def test_decorator_with_specified_schema() -> None:
    """Test that manually specified schemata are passed through to the tool."""

    @tool(args_schema=_MockSchema)
    def tool_func(*, arg1: int, arg2: bool, arg3: dict | None = None) -> str:
        return f"{arg1} {arg2} {arg3}"

    assert isinstance(tool_func, BaseTool)
    assert tool_func.args_schema == _MockSchema

Domain

Subdomains

Frequently Asked Questions

What does test_decorator_with_specified_schema() do?
test_decorator_with_specified_schema() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_decorator_with_specified_schema() defined?
test_decorator_with_specified_schema() is defined in libs/core/tests/unit_tests/test_tools.py at line 200.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free