Skip to content

tests: make test coverage consistent#790

Merged
piksel merged 1 commit intomasterfrom
test/coverage-consistency
Oct 20, 2022
Merged

tests: make test coverage consistent#790
piksel merged 1 commit intomasterfrom
test/coverage-consistency

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 force-pushed the test/coverage-consistency branch from 2956e8b to b533fbc Compare October 20, 2022 10:33
@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.

1 participant