test_ignores_user_messages() — langchain Function Reference
Architecture documentation for the test_ignores_user_messages() function in test_prompt_caching.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fec29e58_6979_9b5d_9927_59a6f101943c["test_ignores_user_messages()"] ced2036e_7d46_6b8d_cbe5_b356ff572281["TestCollectCodeExecutionToolIds"] fec29e58_6979_9b5d_9927_59a6f101943c -->|defined in| ced2036e_7d46_6b8d_cbe5_b356ff572281 style fec29e58_6979_9b5d_9927_59a6f101943c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py lines 456–471
def test_ignores_user_messages(self) -> None:
"""Test that user messages are ignored."""
messages = [
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_123",
"content": "result",
}
],
},
]
result = _collect_code_execution_tool_ids(messages)
assert result == set()
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ignores_user_messages() do?
test_ignores_user_messages() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py.
Where is test_ignores_user_messages() defined?
test_ignores_user_messages() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_prompt_caching.py at line 456.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free