Skip to content
Prev Previous commit
Next Next commit
Update Lib/test/libregrtest/main.py
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
corona10 and AlexWaygood authored Mar 11, 2024
commit 9a4b5a3f324d547b08186d9b935130d225ff5bad
3 changes: 3 additions & 0 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def __init__(self, ns: Namespace, _add_python_opts: bool = False):
if ns.use_mp is None:
if ns.tsan:
# For TSAN tests, use number of CPU of the current process.
Comment thread
corona10 marked this conversation as resolved.
Outdated
#
# os.process.cpu_count() is new in Python 3.13;
# mypy doesn't know about it yet
num_workers = os.process_cpu_count() # type: ignore[attr-defined]
else:
num_workers = 0 # run sequentially
Expand Down