test_get_buffer_string_invalid_format() — langchain Function Reference
Architecture documentation for the test_get_buffer_string_invalid_format() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a9c8de24_39b8_27fa_dc7c_25cb1988851e["test_get_buffer_string_invalid_format()"] ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"] a9c8de24_39b8_27fa_dc7c_25cb1988851e -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4 style a9c8de24_39b8_27fa_dc7c_25cb1988851e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 2265–2273
def test_get_buffer_string_invalid_format() -> None:
"""Test that invalid format values raise `ValueError`."""
messages: list[BaseMessage] = [HumanMessage(content="Hello")]
with pytest.raises(ValueError, match="Unrecognized format"):
get_buffer_string(messages, format="xm") # type: ignore[arg-type]
with pytest.raises(ValueError, match="Unrecognized format"):
get_buffer_string(messages, format="invalid") # type: ignore[arg-type]
with pytest.raises(ValueError, match="Unrecognized format"):
get_buffer_string(messages, format="") # type: ignore[arg-type]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_buffer_string_invalid_format() do?
test_get_buffer_string_invalid_format() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_invalid_format() defined?
test_get_buffer_string_invalid_format() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2265.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free