jfrag1 commented on code in PR #25239:
URL: https://github.com/apache/superset/pull/25239#discussion_r1323821612
##########
tests/unit_tests/tasks/test_cron_util.py:
##########
@@ -53,34 +56,40 @@ def test_cron_schedule_window_los_angeles(
Reports scheduler: Test cron schedule window for "America/Los_Angeles"
"""
- with freeze_time(current_dttm):
- datetimes = cron_schedule_window(cron, "America/Los_Angeles")
- assert (
- list(cron.strftime("%A, %d %B %Y, %H:%M:%S") for cron in datetimes)
- == expected
- )
+ datetimes = cron_schedule_window(
+ datetime.fromisoformat(current_dttm), cron, "America/Los_Angeles"
+ )
+ assert (
+ list(cron.strftime("%A, %d %B %Y, %H:%M:%S") for cron in datetimes) ==
expected
+ )
@pytest.mark.parametrize(
"current_dttm, cron, expected",
[
- ("2020-01-01T00:59:01Z", "0 1 * * *", []),
Review Comment:
They're not removed, I just changed the timestamp format to ISO (zero UTC
offset represented by `+00:00`). The format used is inconsequential to the
`cron_schedule_window` function being tested, since it's just passed a datetime
object.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]