Home / Function/ test_yaml_output_parser_fail() — langchain Function Reference

test_yaml_output_parser_fail() — langchain Function Reference

Architecture documentation for the test_yaml_output_parser_fail() function in test_yaml_parser.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c5609516_d1b8_90b3_5611_6d0ba7198d45["test_yaml_output_parser_fail()"]
  a9d160be_68ac_db26_2081_39e49ca2ca09["test_yaml_parser.py"]
  c5609516_d1b8_90b3_5611_6d0ba7198d45 -->|defined in| a9d160be_68ac_db26_2081_39e49ca2ca09
  style c5609516_d1b8_90b3_5611_6d0ba7198d45 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/output_parsers/test_yaml_parser.py lines 81–90

def test_yaml_output_parser_fail() -> None:
    """Test YamlOutputParser where completion result fails schema validation."""
    yaml_parser: YamlOutputParser[TestModel] = YamlOutputParser(
        pydantic_object=TestModel,
    )

    with pytest.raises(OutputParserException) as exc_info:
        yaml_parser.parse(DEF_RESULT_FAIL)

    assert "Failed to parse TestModel from completion" in str(exc_info.value)

Domain

Subdomains

Frequently Asked Questions

What does test_yaml_output_parser_fail() do?
test_yaml_output_parser_fail() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/output_parsers/test_yaml_parser.py.
Where is test_yaml_output_parser_fail() defined?
test_yaml_output_parser_fail() is defined in libs/langchain/tests/unit_tests/output_parsers/test_yaml_parser.py at line 81.

Analyze Your Own Codebase

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

Try Supermodel Free