Hello and thanks for the great package! I think it could be useful to allow the user to set an environment variable that determines the number of workers to use with --workers auto, maybe something like PYTEST_AUTO_WORKERS, and fallback to the current behavior using os.cpu_count() if that environment variable is not set. Is that a feature you might be interested in? If so I'd be happy to put in a PR.
The use case I have in mind is when you have a workflow that tests with pytest-parallel and the automatic worker count, but on some machines (e.g. when running on your laptop instead of a workstation or cluster) you might want to prevent pytest from using all available cores to keep the UI responsive, etc.
Hello and thanks for the great package! I think it could be useful to allow the user to set an environment variable that determines the number of workers to use with
--workers auto
, maybe something likePYTEST_AUTO_WORKERS
, and fallback to the current behavior usingos.cpu_count()
if that environment variable is not set. Is that a feature you might be interested in? If so I'd be happy to put in a PR.The use case I have in mind is when you have a workflow that tests with pytest-parallel and the automatic worker count, but on some machines (e.g. when running on your laptop instead of a workstation or cluster) you might want to prevent pytest from using all available cores to keep the UI responsive, etc.