From 14f3b63fd41758e7a907dbcfe30ae4dfadd36c5a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 22 Nov 2024 16:00:45 +0100 Subject: [PATCH] gh-109413: Fix libregrtest get_running() Skip threads which are not running. --- Lib/test/libregrtest/run_workers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py index 0ca86a986ea436..424085a0050eb5 100644 --- a/Lib/test/libregrtest/run_workers.py +++ b/Lib/test/libregrtest/run_workers.py @@ -457,7 +457,7 @@ def get_running(workers: list[WorkerThread]) -> str | None: running: list[str] = [] for worker in workers: test_name = worker.test_name - if not test_name: + if test_name == _NOT_RUNNING: continue dt = time.monotonic() - worker.start_time if dt >= PROGRESS_MIN_TIME: