test_text_block() — langchain Function Reference
Architecture documentation for the test_text_block() function in test_prompt_caching.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 92f5a469_5a6f_c2e7_375c_776a83ba38e7["test_text_block()"] 84026b53_c23e_171c_9aac_ba34c6489805["TestIsCodeExecutionRelatedBlock"] 92f5a469_5a6f_c2e7_375c_776a83ba38e7 -->|defined in| 84026b53_c23e_171c_9aac_ba34c6489805 style 92f5a469_5a6f_c2e7_375c_776a83ba38e7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py lines 532–535
def test_text_block(self) -> None:
"""Test that text blocks are not flagged."""
block = {"type": "text", "text": "Hello world"}
assert not _is_code_execution_related_block(block, set())
Domain
Subdomains
Source
Frequently Asked Questions
What does test_text_block() do?
test_text_block() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py.
Where is test_text_block() defined?
test_text_block() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py at line 532.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free