Home / Function/ test_get_buffer_string_xml_no_truncation_under_limit() — langchain Function Reference

test_get_buffer_string_xml_no_truncation_under_limit() — langchain Function Reference

Architecture documentation for the test_get_buffer_string_xml_no_truncation_under_limit() function in test_utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  14011ffc_3cca_5e08_a544_9563e6b1aedc["test_get_buffer_string_xml_no_truncation_under_limit()"]
  03f6a5ae_d57a_eb66_626a_b9e082b763ea["test_utils.py"]
  14011ffc_3cca_5e08_a544_9563e6b1aedc -->|defined in| 03f6a5ae_d57a_eb66_626a_b9e082b763ea
  style 14011ffc_3cca_5e08_a544_9563e6b1aedc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2637–2649

def test_get_buffer_string_xml_no_truncation_under_limit() -> None:
    """Test that content under 500 chars is not truncated."""
    short_text = "a" * 400
    messages: list[BaseMessage] = [
        HumanMessage(
            content=[
                {"type": "text-plain", "text": short_text, "mime_type": "text/plain"},
            ]
        ),
    ]
    result = get_buffer_string(messages, format="xml")
    assert short_text in result
    assert "..." not in result

Domain

Subdomains

Frequently Asked Questions

What does test_get_buffer_string_xml_no_truncation_under_limit() do?
test_get_buffer_string_xml_no_truncation_under_limit() 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_no_truncation_under_limit() defined?
test_get_buffer_string_xml_no_truncation_under_limit() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2637.

Analyze Your Own Codebase

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

Try Supermodel Free