print("Hi")
        added_values = add_one.expand(x=[])
        added_more_values = add_one.expand(x=[])
        say_hi() >> added_values
        added_values >> added_more_values
    dr = dag_maker.create_dagrun()
    session = dag_maker.session
    tis = {ti.task_id: ti for ti in dr.task_instances}
    tis["say_hi"].state = TaskInstanceState.SUCCESS
    session.flush()
    dr.update_state(session=session)  
    dr.update_state(session=session)  
    dr.update_state(session=session)  
    assert dr.state == DagRunState.SUCCESS
    assert tis["add_one__1"].state == TaskInstanceState.SKIPPED
def test_schedulable_task_exist_when_rerun_removed_upstream_mapped_task(session, dag_maker):
    from airflow.decorators import task
    @task
    def do_something(i):
        return 1
    @task
    def do_something_else(i):
        return 1
    with dag_maker():
        nums = do_something.expand(i=[i + 1 for i in range(5)])
        do_something_else.expand(i=nums)
    dr = dag_maker.create_dagrun()
    ti = dr.get_task_instance("do_something_else", session=session)
    ti.map_index = 0