test_exception_error_messages() — langchain Function Reference
Architecture documentation for the test_exception_error_messages() function in test_tool_call_limit.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 873ed48f_ea4e_11f1_1dc0_6971c1e5e53a["test_exception_error_messages()"] a75b8390_08d3_7137_c8a7_9d78fc0c4517["test_tool_call_limit.py"] 873ed48f_ea4e_11f1_1dc0_6971c1e5e53a -->|defined in| a75b8390_08d3_7137_c8a7_9d78fc0c4517 style 873ed48f_ea4e_11f1_1dc0_6971c1e5e53a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_call_limit.py lines 373–390
def test_exception_error_messages() -> None:
"""Test that error messages include expected information."""
# Test for specific tool
with pytest.raises(ToolCallLimitExceededError) as exc_info:
raise ToolCallLimitExceededError(
thread_count=5, run_count=3, thread_limit=4, run_limit=2, tool_name="search"
)
msg = str(exc_info.value)
assert "search" in msg.lower()
assert "5/4" in msg or "thread" in msg.lower()
# Test for all tools
with pytest.raises(ToolCallLimitExceededError) as exc_info:
raise ToolCallLimitExceededError(
thread_count=10, run_count=5, thread_limit=8, run_limit=None, tool_name=None
)
msg = str(exc_info.value)
assert "10/8" in msg or "thread" in msg.lower()
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_exception_error_messages() do?
test_exception_error_messages() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_call_limit.py.
Where is test_exception_error_messages() defined?
test_exception_error_messages() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_call_limit.py at line 373.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free