mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #3836. SetupFakeDriver sometimes causes failure in the unit test.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,5 @@ PPP",
|
||||
output
|
||||
);
|
||||
TestHelpers.AssertDriverAttributesAre ("0", output, null, view.GetNormalColor ());
|
||||
|
||||
((FakeDriver)Application.Driver!).End ();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user