code: def test_as_teardown_oneline(
      dag_maker, setup_type, work_type, teardown_type
  ):
      """
      Check that as_teardown implementations work properly. Tests all combinations of taskflow and classic.
  
      It should mark the teardown as teardown, and if a task is provided, it should mark that as setup
      and set it as a direct upstream.
      """
  
      with dag_maker() as dag:
          s1 = make_task(name="s1", type_=setup_type)
          w1 = make_task(name="w1", type_=work_type)
          t1 = make_task(name="t1", type_=teardown_type)
  
      # verify initial conditions
      for task_ in (s1, w1, t1):
          assert get_task_attr(task_, "upstream_list") == []
          assert get_task_attr(task_, "downstream_list") == []
          assert get_task_attr(task_, "is_setup") is False
          assert get_task_attr(task_, "is_teardown") is False
          assert cleared_tasks(
              dag, get_task_attr(task_, "task_id")
          ) == {get_task_attr(task_, "task_id")}
  
      # now set the deps in one line
      s1 >> w1 >> t1.as_teardown(setups=s1)
  
      # verify resulting configuration
      # should be equiv to the following:
      #   * s1.is_setup = True
      #   * t1.is_teardown = True
      #   * s1 >> t1
      #   * s1 >> w1 >> t1
      for task_, exp_up, exp_down in [
          (s1, set(), {"w1", "t1"}),
          (w1, {"s1"}, {"t1"}),
          (t1, {"s1", "w1"}, set()),
      ]:
          assert get_task_attr(task_, "upstream_task_ids") == exp_up
          assert get_task_attr(task_, "downstream_task_ids") == exp_down
      assert cleared_tasks(dag, "s1") == {"s1", "w1", "t1"}
      assert cleared_tasks(dag, "w1") == {"s1", "w1", "t1"}
      assert cleared_tasks(dag, "t1") == {"t1"}
      for task_, exp_is_setup, exp_is_teardown in [
          (s1, True, False),
          (w1, False, False),
          (t1, False, True),
      ]:
          assert get_task_attr(task_, "is_setup") is exp_is_setup
          assert get_task_attr(task_, "is_teardown") is exp_is_teardown
  
file_path: airflow/tests/models/test_taskmixin.py
imports: from __future__ import annotations
  import itertools
  import pytest
  from airflow.decorators import setup, task, teardown
  from airflow.models.baseoperator import BaseOperator
label_desc: Use image node_id 5 for calling a global function with example usage: test_as_teardown_oneline(dag_maker, setup_type, work_type, teardown_type) without return types