Home / Function/ test_code_execution_tool_use_block() — langchain Function Reference

test_code_execution_tool_use_block() — langchain Function Reference

Architecture documentation for the test_code_execution_tool_use_block() function in test_prompt_caching.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  927fe855_3f6e_3115_f7fb_d68a9edf0ed4["test_code_execution_tool_use_block()"]
  84026b53_c23e_171c_9aac_ba34c6489805["TestIsCodeExecutionRelatedBlock"]
  927fe855_3f6e_3115_f7fb_d68a9edf0ed4 -->|defined in| 84026b53_c23e_171c_9aac_ba34c6489805
  style 927fe855_3f6e_3115_f7fb_d68a9edf0ed4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py lines 498–510

    def test_code_execution_tool_use_block(self) -> None:
        """Test tool_use block called by code_execution."""
        block = {
            "type": "tool_use",
            "id": "toolu_code_exec",
            "name": "get_weather",
            "input": {"location": "NYC"},
            "caller": {
                "type": "code_execution_20250825",
                "tool_id": "srvtoolu_abc",
            },
        }
        assert _is_code_execution_related_block(block, set())

Domain

Subdomains

Frequently Asked Questions

What does test_code_execution_tool_use_block() do?
test_code_execution_tool_use_block() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py.
Where is test_code_execution_tool_use_block() defined?
test_code_execution_tool_use_block() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py at line 498.

Analyze Your Own Codebase

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

Try Supermodel Free