dstandish commented on code in PR #39351:
URL: https://github.com/apache/airflow/pull/39351#discussion_r1586529415
##########
tests/sensors/test_base.py:
##########
@@ -284,62 +284,59 @@ def test_ok_with_reschedule(self, make_sensor,
time_machine, task_reschedules_fo
if ti.task_id == DUMMY_OP:
assert ti.state == State.NONE
- def test_fail_with_reschedule(self, make_sensor, time_machine):
+ def test_fail_with_reschedule(self, make_sensor, time_machine, session):
sensor, dr = make_sensor(return_value=False, poke_interval=10,
timeout=5, mode="reschedule")
+ def _get_tis():
+ tis = dr.get_task_instances(session=session)
+ yield next(x for x in tis if x.task_id == SENSOR_OP)
Review Comment:
yeah considered DRYing it but .... to me it, in the testing context, it is
small enough where it's acceptable to just keep it inline. and you know other
tests may have different numbers of tasks etc so... just didn't want to get
into building an interface for 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]