Taragolis commented on code in PR #28311:
URL: https://github.com/apache/airflow/pull/28311#discussion_r1046262781
##########
tests/api/common/test_mark_tasks.py:
##########
@@ -616,9 +616,10 @@ def test_set_running_dag_run_to_activate_state(self,
dag_run_alter_function: Cal
self._verify_task_instance_states_remain_default(dr)
self._verify_dag_run_dates(self.dag1, date, new_state, middle_time) #
type: ignore
- def test_set_success_dag_run_to_success(self):
+ @pytest.mark.parametrize("completed_state", [State.SUCCESS, State.FAILED])
+ def test_set_success_dag_run_to_success(self, completed_state):
Review Comment:
There were two identical test before:
`test_set_failed_dag_run_to_success` and
`test_set_success_dag_run_to_success`
##########
tests/api/common/test_mark_tasks.py:
##########
@@ -828,11 +800,3 @@ def
test_set_dag_run_state_to_failed_no_running_tasks(self):
dr.get_task_instance(task.task_id).set_state(State.SUCCESS)
set_dag_run_state_to_failed(dag=self.dag1, run_id=dr.run_id)
-
- def tearDown(self):
- self.dag1.clear()
- self.dag2.clear()
-
- with create_session() as session:
- session.query(models.DagRun).delete()
- session.query(models.TaskInstance).delete()
Review Comment:
**TestMarkTasks** migrated to pytest about 1.5 year ago and this method not
executed after that `¯\_(ツ)_/¯`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]