]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109276: libregrtest: limit number workers (#109288)
authorVictor Stinner <vstinner@python.org>
Tue, 12 Sep 2023 03:47:04 +0000 (05:47 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Sep 2023 03:47:04 +0000 (03:47 +0000)
commit8c813faf864ac1d788a3efc45b4e76c1c3c3b340
treed982aaf3f666a93083ec9145eba3f3a2568d443c
parenta84cb74d42a28cf8e72ed7b5d9412fc13d18c817
gh-109276: libregrtest: limit number workers (#109288)

Don't spawn more threads than the number of jobs: these worker
threads would never get anything to do.

* Add the number of tests in "Run ... tests in ..." message.
* Add RunTests.get_jobs() method.
* Add plural() function.
* count() uses f-string.
Lib/test/libregrtest/main.py
Lib/test/libregrtest/run_workers.py
Lib/test/libregrtest/runtests.py
Lib/test/libregrtest/utils.py