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
Added time.get_ticks() tests & increase error deltas for other time module tests #1880
Conversation
…ing correct time gaps for each call.
Looks good to me. Though I think we may need to increase the delta for all these timing tests as we've had one build fail on appveyor here: https://ci.appveyor.com/project/pygame/pygame/builds/33224276/job/2epwec92vadmopcm#L4046 with this output:
Perhaps we should be assuming time.delay is under 5ms accuracy and time.wait() can be more like 50ms? Definitely useful information to find out! And each time the CI builds run we'll gather more data. |
I'm temporarily disabling the time tests in this PR for the release: #1882 |
So, I underestimated delta values. I will increase them to 50ms for time.wait() and to 5ms for time.delay(), as you suggested. I think those should be a big enough error margin to pass every test and also to make sure that functionality is correct. I will make another commit to this branch with changed values in all 3 tests. Really appreciate your feedback, thanks for helping. |
…is allowed during time.wait and 5ms is allowed during time.delay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Hopefully the Continuous Integration gods will approve.
Thanks for your approval. I hope, my contributions were helpful. Trying to get into open source and planning to contribute more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think the new deltas should be enough that the tests won't fail, but I suppose we shall find out over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great :) Thank you.
Hah, just saw one appveyor build fail with a difference of 88 milliseconds on the slow test so it looks like I was too optimistic as to that function's accuracy. |
Implemented correct return-type assertion and ensuring correct time gaps for each call to get_ticks().