Fix Code Coverage Tests#2928
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes failing code coverage tests by removing a conditional block that bypassed image saving when running under code coverage.
- Removed early return conditions checking TestEnvironment.RunsWithCodeCoverage in DebugSave and DebugSaveMultiFrame methods.
- Updated using statement syntax to the newer declaration style for improved consistency.
Comments suppressed due to low confidence (2)
tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs:292
- Confirm that the new using declaration syntax is supported in your project's targeted C# version and applied consistently across the codebase.
using Image<TPixel> debugImage = GetDebugOutputImageMultiFrame<TPixel>(...
tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs:300
- Ensure that the updated using declaration style is consistently used for resource management throughout the repository to avoid style discrepancies.
using Image<TPixel> referenceImage = GetReferenceOutputImageMultiFrame<TPixel>(...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Our code coverage CI build was failing due to an introduced reliance on
DebugSaveXXworking correctly in all build environments.Since we no longer run the coverage tests against PRs directly it's best just to remove the condition.