test_get_buffer_string_xml_escaping_in_content_blocks() — langchain Function Reference
Architecture documentation for the test_get_buffer_string_xml_escaping_in_content_blocks() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0b85331c_b525_239f_32d3_d0d4cb5c316e["test_get_buffer_string_xml_escaping_in_content_blocks()"] ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"] 0b85331c_b525_239f_32d3_d0d4cb5c316e -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4 style 0b85331c_b525_239f_32d3_d0d4cb5c316e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 2550–2562
def test_get_buffer_string_xml_escaping_in_content_blocks() -> None:
"""Test that special XML characters are escaped in content blocks."""
messages: list[BaseMessage] = [
HumanMessage(
content=[
{"type": "text", "text": "Is 5 < 10 & 10 > 5?"},
{"type": "reasoning", "reasoning": "Let's check: <value> & </value>"},
]
),
]
result = get_buffer_string(messages, format="xml")
assert "Is 5 < 10 & 10 > 5?" in result
assert "<value> & </value>" in result
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_buffer_string_xml_escaping_in_content_blocks() do?
test_get_buffer_string_xml_escaping_in_content_blocks() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_xml_escaping_in_content_blocks() defined?
test_get_buffer_string_xml_escaping_in_content_blocks() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2550.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free