-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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: test failure due to rounding #28945
Conversation
This comment has been minimized.
This comment has been minimized.
Issue arises only if the average has decimal. Since random function generates ratings, the average might or might not have decimal. I assume, so far, the test passed cause the average didn't have a decimal and hence the round function really didn't have any effect? 😕 P.S Tests all passing 😄 |
@Mergifyio backport version-13-hotfix |
🟠 Waiting for conditions to match
|
this is failing because of frappe/frappe#15203 Change in code is required, instead of fixing test 😄 |
Skeptical of that since the code assigns the value as it should, without rounding (?) 😕
|
My bad. Ratings are divided by number of stars and stored in db now. |
Let's leave this for now, we will soon start allowing half-star ratings so then rounding won't make much sense. |
(cherry picked from commit 0ca467a)
✅ Backports have been created
|
Rounding produces different result in case of averages with decimal and hence the assertEqual fails.