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

fix: bell and minute rollover, add test case #15

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

harbingerftw
Copy link
Contributor

fixes #14

I was unsure how much or little you wanted tested, does this work?

@EltonChou
Copy link
Owner

EltonChou commented Sep 9, 2024

Recommend removing this part.
So you can check you tests' coverage and design your test cases.

et = EorzeaTime()
et.moon += 13
et.sun += 33
et.bell += 26
et.minute += 65
et.moon -= 13
et.sun -= 33
et.bell -= 26
et.minute -= 65

@EltonChou EltonChou self-requested a review September 9, 2024 12:37
@EltonChou EltonChou self-assigned this Sep 9, 2024
@harbingerftw
Copy link
Contributor Author

I deleted the snippet you suggested, these tests cover all the branches now. does this look good?

Copy link
Owner

@EltonChou EltonChou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure the result can be reproduced in future. Please specify timestamp to create EorzeaTime or assign a value to et.moon and et.year

For example,
Tests will be failed when EorzeaTime(timestamp=datetime(2030, 1, 23).timestamp())

test/test_time.py Outdated Show resolved Hide resolved
test/test_time.py Outdated Show resolved Hide resolved
@EltonChou
Copy link
Owner

LGTM
Thanks for you report and PR.

@EltonChou EltonChou merged commit aca82dd into EltonChou:master Sep 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time rollover is handled incorrectly
2 participants