]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109413: Fix libregrtest get_running() (#127153)
authorVictor Stinner <vstinner@python.org>
Fri, 22 Nov 2024 15:56:03 +0000 (16:56 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 15:56:03 +0000 (16:56 +0100)
Skip threads which are not running.

Lib/test/libregrtest/run_workers.py

index 0ca86a986ea436acb929103a5612f43dc8d31f69..424085a0050eb59e43b7b9a3c1b7a89b31cb0f6a 100644 (file)
@@ -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: