Skip to content

Commit

Permalink
Fixes #3836. SetupFakeDriver sometimes causes failure in the unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDisp committed Nov 19, 2024
1 parent 8da5ce6 commit fabe34f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions UnitTests/TestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ public override void After (MethodInfo methodUnderTest)
// 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);
}
Expand Down
2 changes: 0 additions & 2 deletions UnitTests/View/Adornment/PaddingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ P P
output
);
TestHelpers.AssertDriverAttributesAre ("0", output, null, view.GetNormalColor ());

((FakeDriver)Application.Driver!).End ();
}
}

0 comments on commit fabe34f

Please sign in to comment.