From 3aaefd6053f7c6e237f4faca536494e49424712b Mon Sep 17 00:00:00 2001 From: BDisp Date: Fri, 25 Jul 2025 01:01:01 +0100 Subject: [PATCH] Trying fix unit test error --- Tests/TerminalGuiFluentTesting/GuiTestContext.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/TerminalGuiFluentTesting/GuiTestContext.cs b/Tests/TerminalGuiFluentTesting/GuiTestContext.cs index 6321a86cb..c98c34b24 100644 --- a/Tests/TerminalGuiFluentTesting/GuiTestContext.cs +++ b/Tests/TerminalGuiFluentTesting/GuiTestContext.cs @@ -137,6 +137,12 @@ public class GuiTestContext : IDisposable throw _ex; // Propagate any exception that happened in the background task } + if (Application.Top is { Running: false }) + { + Application.Top?.Dispose (); + Application.Shutdown (); + } + return this; }