diff --git a/Test/TestHelper.cs b/Test/TestHelper.cs index 1219193f..4b6989bd 100644 --- a/Test/TestHelper.cs +++ b/Test/TestHelper.cs @@ -9,6 +9,7 @@ using System.Reflection; using System.Threading; using NUnit.Framework; +using NUnit.Framework.Interfaces; namespace Test { @@ -113,9 +114,13 @@ internal static void ConfirmIdleState() var isStarted = d.Started; if (isStarted) d.StopCapture(); if (isOpened) d.Close(); - - Assert.IsFalse(isOpened, "Expected device to not to be Opened"); - Assert.IsFalse(isStarted, "Expected device to not be Started"); + var status = TestContext.CurrentContext.Result.Outcome.Status; + // If test already failed, no point asserting here + if (status != TestStatus.Failed) + { + Assert.IsFalse(isOpened, "Expected device to not to be Opened"); + Assert.IsFalse(isStarted, "Expected device to not be Started"); + } } } }