Skip to content

Commit

Permalink
add backwards compatibility for pytest hook wrapper (microsoft#23781)
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Jul 30, 2024
1 parent c326428 commit bd3218c
Showing 1 changed file with 1 addition and 1 deletion.
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))
Expand Down

0 comments on commit bd3218c

Please sign in to comment.