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

Adjust epsilon for ticket quality tests #594

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

masih
Copy link
Member

@masih masih commented Aug 27, 2024

Depending on the CPU architecture, the ticket quality tests fail due to differences in exact fraction calculation.

Update the tests to:

  • always assert delta of 1e-15 for fraction
  • assert epsilon error of 1e-3 when fraction is non-zero (otherwise relative error can't be calculated)
  • assert exact equality when fraction is zero.

This is an slight overkill in assertion for the benefit of documenting intent in an executable test.

Depending on the CPU architecture, the ticket quality tests fail due to
differences in exact fraction calculation.

Update the tests to:

* always assert delta of 1e-15 for fraction
* assert epsilon error of 1e-3 when fraction is non-zero (otherwise
  relative error can't be calculated)
* assert exact equality when fraction is zero.

This is an slight overkill in assertion for the benefit of documenting
intent in an executable test.
@masih masih requested a review from Kubuxu August 27, 2024 09:47
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.27%. Comparing base (bcdd23d) to head (63abe8f).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #594      +/-   ##
==========================================
- Coverage   79.61%   79.27%   -0.35%     
==========================================
  Files          52       52              
  Lines        4617     4617              
==========================================
- Hits         3676     3660      -16     
- Misses        586      593       +7     
- Partials      355      364       +9     

see 7 files with indirect coverage changes

@masih masih added this pull request to the merge queue Aug 27, 2024
Merged via the queue into main with commit 0d6c270 Aug 27, 2024
13 checks passed
@masih masih deleted the masih/ticket-quality-epsilon-in-tests branch August 27, 2024 14:11
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.

2 participants