Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_pretty_next_run_with_todays_day_should_return_due_today breaks after midnight #627

Open
mweinelt opened this issue Mar 8, 2023 · 7 comments
Labels
good first issue Good for newcomers help wanted Contributing help wanted type: bug Something isn't working

Comments

@mweinelt
Copy link

mweinelt commented Mar 8, 2023

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
@mweinelt mweinelt added the type: bug Something isn't working label Mar 8, 2023
@welcome
Copy link

welcome bot commented Mar 8, 2023

Thanks for opening your first issue here!

@stale
Copy link

stale bot commented Apr 7, 2023

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.

@stale stale bot added the status: stale Stale issue label Apr 7, 2023
@mweinelt
Copy link
Author

mweinelt commented Apr 7, 2023

Not stale.

@stale stale bot removed the status: stale Stale issue label Apr 7, 2023
@TomerFi TomerFi added the help wanted Contributing help wanted label Apr 10, 2023
@TomerFi
Copy link
Owner

TomerFi commented Apr 10, 2023

@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.

@TomerFi TomerFi added the good first issue Good for newcomers label Apr 10, 2023
@stale
Copy link

stale bot commented May 10, 2023

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.

@stale stale bot added the status: stale Stale issue label May 10, 2023
@stale
Copy link

stale bot commented May 15, 2023

Closing this issue.

@stale stale bot closed this as completed May 15, 2023
@mweinelt
Copy link
Author

mweinelt commented Mar 2, 2024

Just encountered this issue again today. How about using https://github.com/spulec/freezegun?

@TomerFi TomerFi reopened this Mar 3, 2024
@TomerFi TomerFi removed the status: stale Stale issue label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributing help wanted type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants