Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Mar 25, 2024
1 parent a320b9a commit 63b5890
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libs/core/tests/unit_tests/output_parsers/test_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ async def _as_iter(string: str) -> AsyncIterator[str]:
for c in string:
yield c

iter = parser.atransform(_as_iter([MALICIOUS_XML])) # type: ignore

with pytest.raises(ParseError):
chunks = [
chunk
async for chunk in parser.atransform(_as_iter([MALICIOUS_XML])) # type: ignore
]
chunks = [chunk async for chunk in iter]
assert chunks == [{"foo": [{"bar": [{"baz": None}]}]}]

0 comments on commit 63b5890

Please sign in to comment.