sunank200 commented on code in PR #55292:
URL: https://github.com/apache/airflow/pull/55292#discussion_r2344315222


##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1135,9 +1135,18 @@ def test(
         from airflow.sdk import DagRunState, TaskInstanceState, timezone
         from airflow.secrets.local_filesystem import LocalFilesystemBackend
         from airflow.serialization.serialized_objects import SerializedDAG
-        from airflow.utils.state import State
         from airflow.utils.types import DagRunTriggeredByType, DagRunType
 
+        FINISHED_STATES = frozenset(
+            [
+                TaskInstanceState.SUCCESS,
+                TaskInstanceState.FAILED,
+                TaskInstanceState.SKIPPED,
+                TaskInstanceState.UPSTREAM_FAILED,
+                TaskInstanceState.REMOVED,
+            ]
+        )
+
         if TYPE_CHECKING:
             from airflow.models.taskinstance import TaskInstance

Review Comment:
   Moved it to the top.



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