Fix '-n logical' inconsistencies and review --help formatting (#1022)

Fix #1021 and review formatting of the --help messages, following pytest's rules for consistency.
This commit is contained in:
Bruno Oliveira
2024-02-25 11:49:41 -03:00
committed by GitHub
parent ce9b01e50c
commit f57c65839b
3 changed files with 38 additions and 32 deletions

View File

@@ -11,11 +11,11 @@ This can lead to considerable speed ups, especially if your test suite takes a
noticeable amount of time.
With ``-n auto``, pytest-xdist will use as many processes as your computer
has CPU cores.
has physical CPU cores.
Use ``-n logical`` to use the number of *logical* CPU cores rather than
physical ones. This currently requires the ``psutil`` package to be installed;
if it is not, pytest-xdist will fall back to ``-n auto`` behavior.
physical ones. This currently requires the `psutil <https://pypi.org/project/psutil/>`__ package to be installed;
if it is not or if it fails to determine the number of logical CPUs, fall back to ``-n auto`` behavior.
Pass a number, e.g. ``-n 8``, to specify the number of processes explicitly.