code: def test_fail_fast(self, change_state_mock):
      with mock.patch.dict(
          "os.environ", {"AIRFLOW__DEBUG__FAIL_FAST": "True"}
      ):
          executor = DebugExecutor()
  
      ti1 = MagicMock(key="t1")
      ti2 = MagicMock(key="t2")
  
      ti1.run.side_effect = Exception
  
      executor.tasks_to_run = [ti1, ti2]
  
      executor.sync()
  
      assert executor.fail_fast
      assert not executor.tasks_to_run
      change_state_mock.assert_has_calls(
          [
              mock.call(ti1.key, State.FAILED, None),
              mock.call(ti2.key, State.UPSTREAM_FAILED),
          ]
      )
  
file_path: airflow/tests/executors/test_debug_executor.py
imports: from __future__ import annotations
  from unittest import mock
  from unittest.mock import MagicMock
  from airflow.executors.debug_executor import DebugExecutor
  from airflow.utils.state import State
label_desc: Use image node_id 6 for calling the TestDebugExecutor obj's underlying member method code with example usage: obj.test_fail_fast(change_state_mock) without return types