Fixes #3836. SetupFakeDriver sometimes causes failure in the unit test.

This commit is contained in:
BDisp
2024-11-19 21:56:41 +00:00
parent 8da5ce6792
commit fabe34fb2d
2 changed files with 5 additions and 2 deletions

View File

@@ -197,6 +197,11 @@ public class SetupFakeDriverAttribute : BeforeAfterTestAttribute
// Turn off diagnostic flags in case some test left them on
View.Diagnostics = ViewDiagnosticFlags.Off;
if (Application.Driver is { })
{
((FakeDriver)Application.Driver).End ();
}
Application.Driver = null;
base.After (methodUnderTest);
}

View File

@@ -33,7 +33,5 @@ PPP",
output
);
TestHelpers.AssertDriverAttributesAre ("0", output, null, view.GetNormalColor ());
((FakeDriver)Application.Driver!).End ();
}
}