potiuk commented on PR #22658:
URL: https://github.com/apache/airflow/pull/22658#issuecomment-1207792295
I think what woudl be great here is to add a few more tests showing the
different cases and maybe explaining the context in the test a bit better?
The case here is either not tested or it's not clear that it is tested I
think:
```
def _align_to_prev(self, current: DateTime) -> DateTime:
"""Get the prev scheduled time.
This is ``current - interval``, unless ``current`` falls right on the
interval boundary, when ``current`` is returned.
"""
prev_time = self._get_prev(current)
if self._get_next(prev_time) != current:
return prev_time
return current
```
--
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]