Skip to content

Commit 4b29744

Browse files
Merge pull request #2928 from SixLabors/js/fix-codecov-ci
Fix Code Coverage Tests
2 parents 04d0313 + 9ad5318 commit 4b29744

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ public static Image DebugSave(
5959
bool appendSourceFileOrDescription = true,
6060
IImageEncoder encoder = null)
6161
{
62-
if (TestEnvironment.RunsWithCodeCoverage)
63-
{
64-
return image;
65-
}
66-
6762
provider.Utility.SaveTestOutputFile(
6863
image,
6964
extension,
@@ -112,11 +107,6 @@ public static Image<TPixel> DebugSaveMultiFrame<TPixel>(
112107
Func<int, int, bool> predicate = null)
113108
where TPixel : unmanaged, IPixel<TPixel>
114109
{
115-
if (TestEnvironment.RunsWithCodeCoverage)
116-
{
117-
return image;
118-
}
119-
120110
provider.Utility.SaveTestOutputFileMultiFrame(
121111
image,
122112
extension,
@@ -298,24 +288,23 @@ public static Image<TPixel> CompareDebugOutputToReferenceOutputMultiFrame<TPixel
298288
appendPixelTypeToFileName,
299289
predicate: predicate);
300290

301-
using (Image<TPixel> debugImage = GetDebugOutputImageMultiFrame<TPixel>(
291+
using Image<TPixel> debugImage = GetDebugOutputImageMultiFrame<TPixel>(
302292
provider,
303293
image.Frames.Count,
304294
testOutputDetails,
305295
extension,
306296
appendPixelTypeToFileName,
307-
predicate: predicate))
297+
predicate: predicate);
308298

309-
using (Image<TPixel> referenceImage = GetReferenceOutputImageMultiFrame<TPixel>(
299+
using Image<TPixel> referenceImage = GetReferenceOutputImageMultiFrame<TPixel>(
310300
provider,
311301
image.Frames.Count,
312302
testOutputDetails,
313303
extension,
314304
appendPixelTypeToFileName,
315-
predicate: predicate))
316-
{
317-
comparer.VerifySimilarity(referenceImage, debugImage);
318-
}
305+
predicate: predicate);
306+
307+
comparer.VerifySimilarity(referenceImage, debugImage);
319308

320309
return image;
321310
}

0 commit comments

Comments
 (0)