Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.
This repository was archived by the owner on May 29, 2024. It is now read-only.

Control auto worker count through environment variable #110

@kburns

Description

@kburns

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions