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

tests: make test coverage consistent #790

Merged
merged 1 commit into from Oct 20, 2022
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Oct 20, 2022

When dealing with compression, different methods of reducing the size is used depending on the source content. This will cause a different amount of code paths to be used/covered in the tests for every run.

This PR ensures that all uses of Random in the tests use a fixed seed, and as such will always cover the same amount of code.

Without this, the code coverage changes for PRs will fluctuate, and sometimes cause the overall coverage to go down even though the added changes have 100% coverage.

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #790 (b533fbc) into master (75d1cf8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #790   +/-   ##
=======================================
  Coverage   74.71%   74.71%           
=======================================
  Files          72       72           
  Lines        8468     8468           
=======================================
  Hits         6327     6327           
  Misses       2141     2141           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@piksel piksel merged commit fe2b04b into master Oct 20, 2022
@piksel piksel deleted the test/coverage-consistency branch October 31, 2022 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant