docstr: Test that setup >> teardown tasks are set up correctly when used as context managers
  and the normal tasks are set up even if they don't have a relationship set
docstr_tok: ["Test","that","setup",">",">","teardown","tasks","are","set","up","correctly","when","used","as","context","managers","and","the","normal","tasks","are","set","up","even","if","they","do","n't","have","a","relationship","set"]
code: def test_setup_teardown_as_context_manager_with_work_task_rel_not_set(
      self, dag_maker
  ):
      """
      Test that setup >> teardown tasks are set up correctly when used as context managers
      and the normal tasks are set up even if they don't have a relationship set
      """
  
      @setup
      def setuptask():
          print("setup")
  
      @setup
      def setuptask2():
          print("setup")
  
      @teardown
      def teardowntask():
          print("teardown")
  
      @teardown
      def teardowntask2():
          print("teardown")
  
      @task()
      def mytask():
          print("mytask")
  
      @task()
      def mytask2():
          print("mytask")
  
      with dag_maker() as dag:
          with setuptask() >> teardowntask():
              with setuptask2() >> teardowntask2():
                  mytask()
                  mytask2()
  
      assert len(dag.task_group.children) == 6
      assert not dag.task_group.children["setuptask"].upstream_task_ids
      assert dag.task_group.children[
          "setuptask"
      ].downstream_task_ids == {"teardowntask", "setuptask2"}
      assert dag.task_group.children[
          "setuptask2"
      ].upstream_task_ids == {"setuptask"}
      assert dag.task_group.children[
          "setuptask2"
      ].downstream_task_ids == {
          "teardowntask2",
          "mytask",
          "mytask2",
      }
      assert dag.task_group.children["mytask"].upstream_task_ids == {
          "setuptask2"
      }
      assert dag.task_group.children["mytask"].downstream_task_ids == {
          "teardowntask2"
      }
      assert dag.task_group.children["mytask2"].upstream_task_ids == {
          "setuptask2"
      }
      assert dag.task_group.children["mytask2"].downstream_task_ids == {
          "teardowntask2"
      }
      assert dag.task_group.children[
          "teardowntask"
      ].upstream_task_ids == {"setuptask", "teardowntask2"}
      assert not dag.task_group.children[
          "teardowntask"
      ].downstream_task_ids
      assert dag.task_group.children[
          "teardowntask2"
      ].upstream_task_ids == {
          "setuptask2",
          "mytask",
          "mytask2",
      }
      assert dag.task_group.children[
          "teardowntask2"
      ].downstream_task_ids == {"teardowntask"}
  
imports: from __future__ import annotations
  import pytest
  from airflow.decorators import setup, task, task_group, teardown
  from airflow.decorators.setup_teardown import context_wrapper
  from airflow.exceptions import AirflowException
  from airflow.operators.bash import BashOperator
label_desc: Use image node_id 23 for calling the TestSetupTearDownTask obj's underlying member method code with example usage: obj.test_setup_teardown_as_context_manager_with_work_task_rel_not_set(dag_maker) without return types