kaxil commented on code in PR #53455:
URL: https://github.com/apache/airflow/pull/53455#discussion_r2213662807


##########
providers/standard/tests/unit/standard/utils/test_skipmixin.py:
##########
@@ -359,3 +359,84 @@ def 
test_raise_exception_on_not_valid_branch_task_ids(self, dag_maker, branch_ta
         error_message = r"'branch_task_ids' must contain only valid task_ids. 
Invalid tasks found: .*"
         with pytest.raises(AirflowException, match=error_message):
             SkipMixin().skip_all_except(ti=ti1, 
branch_task_ids=branch_task_ids)
+
+    @pytest.mark.skipif(not AIRFLOW_V_3_0_PLUS, reason="Issue only exists in 
Airflow 3.x")
+    def test_ensure_tasks_includes_sensors_airflow_3x(self, dag_maker):
+        """Test that sensors (inheriting from airflow.sdk.BaseOperator) are 
properly handled by _ensure_tasks."""
+        from airflow.providers.standard.utils.skipmixin import _ensure_tasks
+        from airflow.sdk import BaseOperator as SDKBaseOperator
+        from airflow.sdk.bases.sensor import BaseSensorOperator
+
+        class DummySensor(BaseSensorOperator):
+            def __init__(self, **kwargs):
+                super().__init__(**kwargs)
+                self.timeout = 0
+                self.poke_interval = 0
+
+            def poke(self, context):
+                return True
+
+        with dag_maker("dag_test_sensor_skipping") as dag:

Review Comment:
   Correct



-- 
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]

Reply via email to