From 8c18f744f12850fcb5b1d878943143ae2df851c4 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Mon, 15 Jul 2024 14:07:21 -0700 Subject: [PATCH] add backwards compatibility for pytest hook wrapper (#23781) fixes https://github.com/microsoft/vscode-python/issues/23780 --- python_files/vscode_pytest/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_files/vscode_pytest/__init__.py b/python_files/vscode_pytest/__init__.py index c3be7e53d1b6..656846513c93 100644 --- a/python_files/vscode_pytest/__init__.py +++ b/python_files/vscode_pytest/__init__.py @@ -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))