Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest plugin should detect if pytest-xdist is installed and decide whether to use it based on how many tests are executed #22521

Closed
DetachHead opened this issue Nov 24, 2023 · 3 comments
Assignees
Labels
area-testing feature-request Request for new features or functionality needs community feedback Awaiting community feedback

Comments

@DetachHead
Copy link

my PC has 12 cores, and i have the pytest-xdist plugin configured to automatically decide how many workers to use:

# pyproject.toml
[tool.pytest.ini_options]
addopts = ['-n', 'auto']

this significantly speeds up pytest when i run all my tests, but when running an individual test, it's much slower because it starts up 12 workers (and also has to connect the debugger to each of them if running in debug mode) just to run a single test.

it would be nice if the vscode extension could automatically specify a -n argument to pytest-xdist based on how many tests are being run at a time

@DetachHead DetachHead added the feature-request Request for new features or functionality label Nov 24, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 24, 2023
@cwebster-99 cwebster-99 added the needs community feedback Awaiting community feedback label Nov 27, 2023
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@cwebster-99 cwebster-99 added area-testing and removed triage-needed Needs assignment to the proper sub-team labels Nov 27, 2023
@DetachHead
Copy link
Author

related: pytest-dev/pytest-xdist#853

@eleanorjboyd eleanorjboyd self-assigned this Dec 4, 2023
@brettcannon
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality needs community feedback Awaiting community feedback
Projects
None yet
Development

No branches or pull requests

4 participants