test_single_code_execution_call() — langchain Function Reference
Architecture documentation for the test_single_code_execution_call() function in test_prompt_caching.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f88a9f58_7462_9a8c_d995_8092c01f02c6["test_single_code_execution_call()"] ced2036e_7d46_6b8d_cbe5_b356ff572281["TestCollectCodeExecutionToolIds"] f88a9f58_7462_9a8c_d995_8092c01f02c6 -->|defined in| ced2036e_7d46_6b8d_cbe5_b356ff572281 style f88a9f58_7462_9a8c_d995_8092c01f02c6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py lines 373–393
def test_single_code_execution_call(self) -> None:
"""Test with a single code_execution tool call."""
messages = [
{
"role": "assistant",
"content": [
{
"type": "tool_use",
"id": "toolu_code_exec_1",
"name": "get_weather",
"input": {"location": "NYC"},
"caller": {
"type": "code_execution_20250825",
"tool_id": "srvtoolu_abc123",
},
}
],
},
]
result = _collect_code_execution_tool_ids(messages)
assert result == {"toolu_code_exec_1"}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_single_code_execution_call() do?
test_single_code_execution_call() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py.
Where is test_single_code_execution_call() defined?
test_single_code_execution_call() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py at line 373.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free