_test_parser() — langchain Function Reference
Architecture documentation for the _test_parser() function in test_xml_parser.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7074acdd_caf9_5de9_03d7_d96684d978a8["_test_parser()"] a1505d99_fe37_04cb_8c81_2640a51076f6["test_xml_parser.py"] 7074acdd_caf9_5de9_03d7_d96684d978a8 -->|defined in| a1505d99_fe37_04cb_8c81_2640a51076f6 07763ca4_a9aa_76ba_33a4_7965f3e33123["test_xml_output_parser()"] 07763ca4_a9aa_76ba_33a4_7965f3e33123 -->|calls| 7074acdd_caf9_5de9_03d7_d96684d978a8 b5968de3_4731_2f57_d0f3_5c7325c4878e["test_xml_output_parser_defused()"] b5968de3_4731_2f57_d0f3_5c7325c4878e -->|calls| 7074acdd_caf9_5de9_03d7_d96684d978a8 61f10ab4_274d_c282_0340_9648fb40af58["_as_iter()"] 7074acdd_caf9_5de9_03d7_d96684d978a8 -->|calls| 61f10ab4_274d_c282_0340_9648fb40af58 style 7074acdd_caf9_5de9_03d7_d96684d978a8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/output_parsers/test_xml_parser.py lines 47–64
async def _test_parser(parser: XMLOutputParser, content: str) -> None:
"""Test parser."""
assert parser.parse(content) == DEF_RESULT_EXPECTED
assert await parser.aparse(content) == DEF_RESULT_EXPECTED
assert list(parser.transform(iter(content))) == [
{"foo": [{"bar": [{"baz": None}]}]},
{"foo": [{"bar": [{"baz": "slim.shady"}]}]},
{"foo": [{"baz": "tag"}]},
]
chunks = [chunk async for chunk in parser.atransform(_as_iter(content))]
assert list(chunks) == [
{"foo": [{"bar": [{"baz": None}]}]},
{"foo": [{"bar": [{"baz": "slim.shady"}]}]},
{"foo": [{"baz": "tag"}]},
]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does _test_parser() do?
_test_parser() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/output_parsers/test_xml_parser.py.
Where is _test_parser() defined?
_test_parser() is defined in libs/core/tests/unit_tests/output_parsers/test_xml_parser.py at line 47.
What does _test_parser() call?
_test_parser() calls 1 function(s): _as_iter.
What calls _test_parser()?
_test_parser() is called by 2 function(s): test_xml_output_parser, test_xml_output_parser_defused.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free