Browse Source

Use higher tolerance on macOS CI runs

js/color-alpha-handling
James Jackson-South 5 years ago
parent
commit
46f47eb97b
  1. 3
      tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs
  2. 2
      tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs

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

@ -35,7 +35,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
nameof(KnownResamplers.Lanczos5),
};
private static readonly ImageComparer ValidatorComparer = ImageComparer.TolerantPercentage(0.07F);
private static readonly ImageComparer ValidatorComparer =
ImageComparer.TolerantPercentage(TestEnvironment.IsOSX && TestEnvironment.RunsOnCI ? 0.2595F : 0.07F);
[Fact]
public void Resize_PixelAgnostic()

2
tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs

@ -108,6 +108,8 @@ namespace SixLabors.ImageSharp.Tests
internal static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
internal static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
internal static bool IsMono => Type.GetType("Mono.Runtime") != null; // https://stackoverflow.com/a/721194
internal static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

Loading…
Cancel
Save