aioswitcher
aioswitcher copied to clipboard
test_pretty_next_run_with_todays_day_should_return_due_today breaks after midnight
What happened?
The test test_pretty_next_run_with_todays_day_should_return_due_today breaks breaks when run after midnight. It does not seem increment the day.
Module Version
3.2.2
Device Type
Switcher V2
Firmware Version
n/a
Relevant log output
――――――――― test_pretty_next_run_with_todays_day_should_return_due_today ―――――――――
todays_day = <Days.WEDNESDAY: 'Wednesday'>, one_hour_from_now = '00:04'
def test_pretty_next_run_with_todays_day_should_return_due_today(todays_day, one_hour_from_now):
expected_return = f"Due today at {one_hour_from_now}"
> assert_that(tools.pretty_next_run(one_hour_from_now, {todays_day})).is_equal_to(expected_return)
E AssertionError: Expected <Due next Wednesday at 00:04> to be equal to <Due today at 00:04>, but was not.
tests/test_schedule_tools.py:52: AssertionError
Thanks for opening your first issue here!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale.
@mweinelt Sorry - I missed this issue. Thank you for reporting this.
I hope to find the time soon to check this. For now, I'll add the help-wanted label, in case someone else will have time.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue.
Just encountered this issue again today. How about using https://github.com/spulec/freezegun?