Skip to content

Commit 6e589e8

Browse files
Use higher tolerance on macOS CI runs
1 parent 25d5e48 commit 6e589e8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public class ResizeTests
3535
nameof(KnownResamplers.Lanczos5),
3636
};
3737

38-
private static readonly ImageComparer ValidatorComparer = ImageComparer.TolerantPercentage(0.07F);
38+
private static readonly ImageComparer ValidatorComparer =
39+
ImageComparer.TolerantPercentage(TestEnvironment.IsOSX && TestEnvironment.RunsOnCI ? 0.2595F : 0.07F);
3940

4041
[Fact]
4142
public void Resize_PixelAgnostic()

tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ internal static string GetReferenceOutputFileName(string actualOutputFileName) =
108108

109109
internal static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
110110

111+
internal static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
112+
111113
internal static bool IsMono => Type.GetType("Mono.Runtime") != null; // https://stackoverflow.com/a/721194
112114

113115
internal static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

0 commit comments

Comments
 (0)