From 81fce662697bcbc20b59b474725d405a9b09f047 Mon Sep 17 00:00:00 2001 From: Nahor Date: Thu, 18 Dec 2025 11:25:49 -0800 Subject: [PATCH] test_driver: flush output after each test When the output is redirected, Python buffer its whole output, unlike a TTY output where only lines are buffered. In GitHub actions in particular, it means that we can't see any progress after each test. And if a test blocks forever, there is no output at all. So flush the output after printing each result to see the progress being made --- tests/test_driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_driver.py b/tests/test_driver.py index fb96b1e37..f672bba95 100755 --- a/tests/test_driver.py +++ b/tests/test_driver.py @@ -184,7 +184,8 @@ async def main(): ) suffix_str = "" if suffix is None else f"\n{suffix}" print( - f"{arg.ljust(longest_test_name_length)} {color}{result}{RESET} {duration_str}{suffix_str}" + f"{arg.ljust(longest_test_name_length)} {color}{result}{RESET} {duration_str}{suffix_str}", + flush=True, ) with tempfile.TemporaryDirectory(prefix="fishtest-root-") as tmp_root: