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 20:35:30 UTC

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

XD-DENG commented on a change in pull request #12667:
URL: https://github.com/apache/airflow/pull/12667#discussion_r531779764



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -516,12 +516,12 @@ def test_process_task_instances_with_task_concurrency(
                 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 == [
+        ti_to_schedule.append.assert_called_once_with(
             (dag.dag_id, dag_task1.task_id, DEFAULT_DATE, TRY_NUMBER),
-        ]
+        )

Review comment:
       We don't "have to" make change for this line. Only for consistent testing style/method.




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