dag_id = "test_depends_on_past"
        dag = self.dagbag.get_dag(dag_id)
        task = dag.tasks[0]
        dag_run_1 = self.create_dag_run(
            dag,
            execution_date=timezone.datetime(2016, 1, 1, 0, 0, 0),
            is_backfill=True,
            session=session,
        )
        dag_run_2 = self.create_dag_run(
            dag,
            execution_date=timezone.datetime(2016, 1, 2, 0, 0, 0),
            is_backfill=True,
            session=session,
        )
        prev_ti = TI(task, run_id=dag_run_1.run_id)
        ti = TI(task, run_id=dag_run_2.run_id)
        prev_ti.set_state(prev_ti_state)
        ti.set_state(TaskInstanceState.QUEUED)
        ti.run()
        assert (ti.state == TaskInstanceState.SUCCESS) == is_ti_success
    @pytest.mark.parametrize(
        "prev_ti_state, is_ti_success",
        [
            (TaskInstanceState.SUCCESS, True),
            (TaskInstanceState.SKIPPED, True),
            (TaskInstanceState.RUNNING, False),
            (TaskInstanceState.FAILED, False),
            (None, False),
        ],