You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/27 21:36:48 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #12667: Fix test in PR 12663

kaxil commented on a change in pull request #12667:
URL: https://github.com/apache/airflow/pull/12667#discussion_r531790955



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -567,13 +567,15 @@ def test_process_task_instances_depends_on_past(self, state, start_date, end_dat
                 ti.start_date = start_date
                 ti.end_date = end_date
 
-        ti_to_schedule = []
+        ti_to_schedule = Mock()
         scheduler_job._process_task_instances(dag, task_instances_list=ti_to_schedule)
 
-        assert ti_to_schedule == [
-            (dag.dag_id, dag_task1.task_id, DEFAULT_DATE, TRY_NUMBER),
-            (dag.dag_id, dag_task2.task_id, DEFAULT_DATE, TRY_NUMBER),
-        ]
+        ti_to_schedule.append.assert_called_with(

Review comment:
       Maybe just make the list sorted:
   
   ```
   assert sorted([(dag.dag_id, dag_task1.task_id, DEFAULT_DATE, TRY_NUMBER), (dag.dag_id, dag_task2.task_id, DEFAULT_DATE, TRY_NUMBER),]) == sorted(ti_to_schedule)
   ```
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org