From 816a379218bd4e0e24cac2adfff3501d392fb8db Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sun, 13 Jun 2021 16:40:58 +0200 Subject: [PATCH] use ConditionalFact to skip the test --- .../TestUtilities/Tests/TestEnvironmentTests.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs index 0645b7996..60f4101cc 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs @@ -115,17 +115,14 @@ namespace SixLabors.ImageSharp.Tests Assert.IsType(expectedDecoderType, decoder); } - [Fact] + // The RemoteExecutor fix does not work well with the "dotnet xunit" call + // we use with Framework on 32 bit: + // https://github.com/SixLabors/ImageSharp/blob/381dff8640b721a34b1227c970fcf6ad6c5e3e72/ci-test.ps1#L30 + public static bool IsNot32BitNetFramework = !TestEnvironment.IsFramework || TestEnvironment.Is64BitProcess; + + [ConditionalFact(nameof(IsNot32BitNetFramework))] public void RemoteExecutor_FailingRemoteTestShouldFailLocalTest() { - if (TestEnvironment.IsFramework && !TestEnvironment.Is64BitProcess) - { - // The RemoteExecutor fix does not work well with the "dotnet xunit" call - // we use with Framework on 32 bit: - // https://github.com/SixLabors/ImageSharp/blob/381dff8640b721a34b1227c970fcf6ad6c5e3e72/ci-test.ps1#L30 - return; - } - static void FailingCode() { Assert.False(true);