Lee-W commented on code in PR #72149:
URL: https://github.com/apache/airflow/pull/72149#discussion_r4130274609
##########
providers/openai/tests/unit/openai/operators/test_openai.py:
##########
@@ -935,3 +963,100 @@ def test_failed_event_raises(self, event):
def test_invalid_event_raises_instead_of_succeeding(self, event):
with pytest.raises(OpenAITriggerEventError):
self._operator().execute_complete(Context(), event)
+
+ @pytest.mark.parametrize(
+ ("termination_reason", "expected_exc"),
+ [
+ pytest.param("timeout", OpenAIBatchTimeout, id="timeout"),
Review Comment:
Added a `TerminationReason` str enum. The trigger emits it, and the
exception map and the operator's timeout check both key on it, so a misspelled
member is an attribute error under mypy.
--
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]