FrankYang0529 commented on code in PR #74537:
URL: https://github.com/apache/airflow/pull/74537#discussion_r4244401056
##########
providers/common/ai/tests/unit/common/ai/utils/test_output_type.py:
##########
@@ -60,3 +65,26 @@ def test_returns_raw_on_schema_mismatch(self):
# ``A`` requires ``x: int`` -- this payload should fail validation
result = rehydrate_pydantic_output(A, '{"y": "no-x-field"}',
serialize_output=False)
assert result == '{"y": "no-x-field"}'
+
+ @pytest.mark.parametrize(
+ ("output_type", "raw", "expected"),
+ [
+ pytest.param([A, B], '{"x": 7}', {"x": 7},
id="list-of-output-types"),
Review Comment:
This version no longer changes `rehydrate_pydantic_output`, so related tests
are removed. The condition that decides when `AgentOperator` returns a dict has
test cases for a list of output types, an output marker, an output function, a
`TypeAliasType`, a `NewType` and `serialize_output=True`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]