Home / Function/ test_tool_mutate_input() — langchain Function Reference

test_tool_mutate_input() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 2616–2631

def test_tool_mutate_input() -> None:
    class MyTool(BaseTool):
        name: str = "MyTool"
        description: str = "a tool"

        @override
        def _run(
            self,
            x: str,
            run_manager: CallbackManagerForToolRun | None = None,
        ) -> str:
            return "hi"

    my_input = {"x": "hi"}
    MyTool().invoke(my_input)
    assert my_input == {"x": "hi"}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free