From f11a9e3e2ea35b617efd7a86ba0a9d57876d4a3e Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Tue, 2 Jul 2024 16:32:28 -0400 Subject: [PATCH] tests: Work around a Textual deadlock There's a deadlock on shutdown when the pilot exits before the message pump has quiesced, but it doesn't occur when we wait for the message pump to become idle. Signed-off-by: Matt Wozniski --- tests/unit/test_tui_reporter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_tui_reporter.py b/tests/unit/test_tui_reporter.py index ded0c901e5..985f369fd9 100644 --- a/tests/unit/test_tui_reporter.py +++ b/tests/unit/test_tui_reporter.py @@ -462,8 +462,9 @@ def on_snapshot_fetched(self, message): # WHEN async def run_test(): - async with app.run_test(): + async with app.run_test() as pilot: await all_messages_received.wait() + await pilot.pause() async_run(run_test())