Home / Function/ test_convert_to_message_is_strict() — langchain Function Reference

test_convert_to_message_is_strict() — langchain Function Reference

Architecture documentation for the test_convert_to_message_is_strict() function in test_chat.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  18ec70fb_53e0_cf01_ca4c_cba21a2f7ffa["test_convert_to_message_is_strict()"]
  00c8bbe0_a31c_1ac8_487a_bfd5a9d6b117["test_chat.py"]
  18ec70fb_53e0_cf01_ca4c_cba21a2f7ffa -->|defined in| 00c8bbe0_a31c_1ac8_487a_bfd5a9d6b117
  style 18ec70fb_53e0_cf01_ca4c_cba21a2f7ffa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_chat.py lines 805–811

def test_convert_to_message_is_strict() -> None:
    """Verify that _convert_to_message is strict."""
    with pytest.raises(ValueError, match="Unexpected message type: meow"):
        # meow does not correspond to a valid message type.
        # this test is here to ensure that functionality to interpret `meow`
        # as a role is NOT added.
        _convert_to_message_template(("meow", "question"))

Domain

Subdomains

Frequently Asked Questions

What does test_convert_to_message_is_strict() do?
test_convert_to_message_is_strict() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_chat.py.
Where is test_convert_to_message_is_strict() defined?
test_convert_to_message_is_strict() is defined in libs/core/tests/unit_tests/prompts/test_chat.py at line 805.

Analyze Your Own Codebase

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

Try Supermodel Free