From c638fb3e01a9ea52c07c9d0c7565c53337b90c21 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 22 Nov 2024 16:56:03 +0100 Subject: [PATCH] gh-109413: Fix libregrtest get_running() (GH-127153) Skip threads which are not running. (cherry picked from commit 0cb20177d667f0058f3d8d808abaf340e8345f04) Co-authored-by: Victor Stinner --- 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 404e0826ce9c3a..3c6d13215fd79d 100644 --- a/Lib/test/libregrtest/run_workers.py +++ b/Lib/test/libregrtest/run_workers.py @@ -451,7 +451,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: