Fokko commented on a change in pull request #4408: [AIRFLOW-3589] Visualize
reschedule state in all views
URL: https://github.com/apache/airflow/pull/4408#discussion_r245905741
##########
File path: tests/test_jobs.py
##########
@@ -2387,6 +2505,14 @@ def test_scheduler_process_task_instances(self):
dr = scheduler.create_dag_run(dag)
self.assertIsNotNone(dr)
+ tis = dr.get_task_instances(session=session)
Review comment:
I know that this is just a test, but can we change this using the `with`
statements? For example:
```suggestion
from airflow.utils.db import create_session
with create_session() as session:
session.query(DagRun).delete()
session.query(TaskInstance).delete()
```
In this case we won't give a bad example.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services