Skip to content

Commit fabe34f

Browse files
committed
Fixes #3836. SetupFakeDriver sometimes causes failure in the unit test.
1 parent 8da5ce6 commit fabe34f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

UnitTests/TestHelpers.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ public override void After (MethodInfo methodUnderTest)
197197
// Turn off diagnostic flags in case some test left them on
198198
View.Diagnostics = ViewDiagnosticFlags.Off;
199199

200+
if (Application.Driver is { })
201+
{
202+
((FakeDriver)Application.Driver).End ();
203+
}
204+
200205
Application.Driver = null;
201206
base.After (methodUnderTest);
202207
}

UnitTests/View/Adornment/PaddingTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,5 @@ P P
3333
output
3434
);
3535
TestHelpers.AssertDriverAttributesAre ("0", output, null, view.GetNormalColor ());
36-
37-
((FakeDriver)Application.Driver!).End ();
3836
}
3937
}

0 commit comments

Comments
 (0)