Taragolis commented on code in PR #38673:
URL: https://github.com/apache/airflow/pull/38673#discussion_r1559084925
##########
tests/providers/google/cloud/operators/test_automl.py:
##########
@@ -90,6 +100,22 @@ def test_execute(self, mock_hook):
metadata=(),
)
+
@mock.patch("airflow.providers.google.cloud.operators.automl.CloudAutoMLHook")
+ def test_execute_deprecated(self, mock_hook):
+ op = AutoMLTrainModelOperator(
+ model=MODEL_DEPRECATED,
+ location=GCP_LOCATION,
+ project_id=GCP_PROJECT_ID,
+ task_id=TASK_ID,
+ )
+ with pytest.raises(AirflowProviderDeprecationWarning) as err:
Review Comment:
We should not raise warning as regular exception and usual it is
semantically incorrect, because this is user decision whether or not raise
specific warning as exception by configure `PYTHONWARNINGS`
(https://docs.python.org/3/library/warnings.html)
--
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]