Home / Function/ test_decorated_function_schema_equivalent() — langchain Function Reference

test_decorated_function_schema_equivalent() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 233–249

def test_decorated_function_schema_equivalent() -> None:
    """Test that a BaseTool without a schema meets expectations."""

    @tool
    def structured_tool_input(
        *, arg1: int, arg2: bool, arg3: dict | None = None
    ) -> str:
        """Return the arguments directly."""
        return f"{arg1} {arg2} {arg3}"

    assert isinstance(structured_tool_input, BaseTool)
    assert structured_tool_input.args_schema is not None
    assert (
        _schema(structured_tool_input.args_schema)["properties"]
        == _schema(_MockSchema)["properties"]
        == _normalize_schema(structured_tool_input.args)
    )

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free