]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-109413: Fix libregrtest get_running() (GH-127153) (#127157)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 22 Nov 2024 16:34:07 +0000 (17:34 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 16:34:07 +0000 (16:34 +0000)
gh-109413: Fix libregrtest get_running() (GH-127153)

Skip threads which are not running.
(cherry picked from commit 0cb20177d667f0058f3d8d808abaf340e8345f04)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/libregrtest/run_workers.py

index 404e0826ce9c3ae43e93ef75dbebf543f0a59b37..3c6d13215fd79d71ad7023b823098d47ca7495ac 100644 (file)
@@ -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: