test_base_tool_inheritance_base_schema() — langchain Function Reference
Architecture documentation for the test_base_tool_inheritance_base_schema() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2f170046_cb00_af21_7e28_d47aab0c73d4["test_base_tool_inheritance_base_schema()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 2f170046_cb00_af21_7e28_d47aab0c73d4 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style 2f170046_cb00_af21_7e28_d47aab0c73d4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 415–433
def test_base_tool_inheritance_base_schema() -> None:
"""Test schema is correctly inferred when inheriting from BaseTool."""
class _MockSimpleTool(BaseTool):
name: str = "simple_tool"
description: str = "A Simple Tool"
@override
def _run(self, tool_input: str) -> str:
return f"{tool_input}"
@override
async def _arun(self, tool_input: str) -> str:
raise NotImplementedError
simple_tool = _MockSimpleTool()
assert simple_tool.args_schema is None
expected_args = {"tool_input": {"title": "Tool Input", "type": "string"}}
assert simple_tool.args == expected_args
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_base_tool_inheritance_base_schema() do?
test_base_tool_inheritance_base_schema() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_base_tool_inheritance_base_schema() defined?
test_base_tool_inheritance_base_schema() is defined in libs/core/tests/unit_tests/test_tools.py at line 415.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free