test_missing_docstring() — langchain Function Reference
Architecture documentation for the test_missing_docstring() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2cf808fd_b1fc_4b53_e137_bea3808efc57["test_missing_docstring()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 2cf808fd_b1fc_4b53_e137_bea3808efc57 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style 2cf808fd_b1fc_4b53_e137_bea3808efc57 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 720–733
def test_missing_docstring() -> None:
"""Test error is raised when docstring is missing."""
# expect to throw a value error if there's no docstring
with pytest.raises(ValueError, match="Function must have a docstring"):
@tool
def search_api(query: str) -> str:
return "API result"
@tool
class MyTool(BaseModel):
foo: str
assert not MyTool.description # type: ignore[attr-defined]
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_missing_docstring() do?
test_missing_docstring() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_missing_docstring() defined?
test_missing_docstring() is defined in libs/core/tests/unit_tests/test_tools.py at line 720.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free