Add psutil extra and introduce pytest_xdist_auto_num_workers hook

This makes using psutil optional and opens up the possibility of customization
through the pytest_xdist_auto_num_workers hook, making things like #477 possible.

Fix #585
This commit is contained in:
Bruno Oliveira
2020-08-24 15:17:43 -03:00
parent e469fc7b80
commit 607d8288d4
10 changed files with 88 additions and 21 deletions

View File

@@ -57,10 +57,11 @@ Install the plugin with::
pip install pytest-xdist
or use the package in develop/in-place mode with
a checkout of the `pytest-xdist repository`_ ::
pip install --editable .
To use ``psutil`` for detection of the number of CPUs available, install the ``psutil`` extra::
pip install pytest-xdist[psutil]
.. _parallelization: