https://github.com/python/cpython/commit/f0d1a20b77b136906505e1f8a52597498f7b3257
commit: f0d1a20b77b136906505e1f8a52597498f7b3257
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2024-11-22T16:34:07Z
summary:

[3.13] gh-109413: Fix libregrtest get_running() (GH-127153) (#127157)

gh-109413: Fix libregrtest get_running() (GH-127153)

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

Co-authored-by: Victor Stinner <[email protected]>

files:
M Lib/test/libregrtest/run_workers.py

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:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to