Home / Function/ test_pydantic_output_parser_fail() — langchain Function Reference

test_pydantic_output_parser_fail() — langchain Function Reference

Architecture documentation for the test_pydantic_output_parser_fail() function in test_pydantic_parser.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d3a01bc0_6348_9694_47ac_6ec38c3e75b5["test_pydantic_output_parser_fail()"]
  70078932_b952_16ac_83c5_c9026d556e63["test_pydantic_parser.py"]
  d3a01bc0_6348_9694_47ac_6ec38c3e75b5 -->|defined in| 70078932_b952_16ac_83c5_c9026d556e63
  style d3a01bc0_6348_9694_47ac_6ec38c3e75b5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py lines 158–165

def test_pydantic_output_parser_fail() -> None:
    """Test PydanticOutputParser where completion result fails schema validation."""
    pydantic_parser = PydanticOutputParser[TestModel](pydantic_object=TestModel)

    with pytest.raises(
        OutputParserException, match="Failed to parse TestModel from completion"
    ):
        pydantic_parser.parse(DEF_RESULT_FAIL)

Domain

Subdomains

Frequently Asked Questions

What does test_pydantic_output_parser_fail() do?
test_pydantic_output_parser_fail() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py.
Where is test_pydantic_output_parser_fail() defined?
test_pydantic_output_parser_fail() is defined in libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py at line 158.

Analyze Your Own Codebase

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

Try Supermodel Free