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:
1
changelog/585.feature.rst
Normal file
1
changelog/585.feature.rst
Normal file
@@ -0,0 +1 @@
|
||||
New ``pytest_xdist_auto_num_workers`` hook can be implemented by plugins or ``conftest.py`` files to control the number of workers when ``--numprocesses=auto`` is given in the command-line.
|
||||
3
changelog/585.trivial.rst
Normal file
3
changelog/585.trivial.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
``psutil`` has proven to make ``pytest-xdist`` installation in certain platforms and containers problematic, so to use it for automatic number of CPUs detection users need to install the ``psutil`` extra::
|
||||
|
||||
pip install pytest-xdist[psutil]
|
||||
Reference in New Issue
Block a user