uranusjr commented on code in PR #33720:
URL: https://github.com/apache/airflow/pull/33720#discussion_r1311136061


##########
tests/models/test_taskinstance.py:
##########
@@ -103,6 +103,15 @@ def test_pool():
         session.rollback()
 
 
[email protected]
+def task_reschedules_for_ti():
+    def wrapper(ti):
+        with create_session() as session:
+            return 
session.scalars(TaskReschedule.stmt_for_task_instance(ti=ti, 
descending=False)).all()
+
+    return wrapper

Review Comment:
   ```suggestion
   def task_reschedules_for_ti(session):
       def wrapper(ti):
           return session.scalars(TaskReschedule.stmt_for_task_instance(ti=ti, 
descending=False)).all()
   
       return wrapper
   ```
   
   (I think this should work. `session` here is a function-level fixture.)



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

Reply via email to