MCPcopy Index your code
hub / github.com/python/cpython / get_running

Function get_running

Lib/test/libregrtest/run_workers.py:456–468  ·  view source on GitHub ↗
(workers: list[WorkerThread])

Source from the content-addressed store, hash-verified

454
455
456def get_running(workers: list[WorkerThread]) -> str | None:
457 running: list[str] = []
458 for worker in workers:
459 test_name = worker.test_name
460 if test_name == _NOT_RUNNING:
461 continue
462 dt = time.monotonic() - worker.start_time
463 if dt >= PROGRESS_MIN_TIME:
464 text = f'{test_name} ({format_duration(dt)})'
465 running.append(text)
466 if not running:
467 return None
468 return f"running ({len(running)}): {', '.join(running)}"
469
470
471class RunWorkers:

Callers 2

_get_resultMethod · 0.85
display_resultMethod · 0.85

Calls 3

format_durationFunction · 0.85
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…