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

add backwards compatibility for pytest hook wrapper #23781

Merged
merged 12 commits into from
Jul 15, 2024
2 changes: 1 addition & 1 deletion python_files/vscode_pytest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def send_post_request(


class DeferPlugin:
@pytest.hookimpl(wrapper=True)
@pytest.hookimpl(hookwrapper=True)
def pytest_xdist_auto_num_workers(self, config: pytest.Config) -> Generator[None, int, int]:
"""Determine how many workers to use based on how many tests were selected in the test explorer."""
return min((yield), len(config.option.file_or_dir))
eleanorjboyd marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading