Don't re-run pytest when an exception in a test occurs by apuly · Pull Request #25588 · microsoft/vscode-python

added 2 commits

November 14, 2025 08:13
The general `except` around the pytest run was causing tests to run twice if the exception handling of pytest is disabled.
From the comment in the code it seems the exception handling is only there for when reading the test IDs break, so it shouldn't be required around the pytest main call.

Disabling the exception handling can be practical for debugging tests, as this starts up the python debugger within vscode. Currently however, this requires manually patching the run_pytest_script.py, which needs to be re-done every vscode update.

eleanorjboyd

@eleanorjboyd eleanorjboyd added the bug

Issue identified by VS Code Team member as probable bug

label

Dec 12, 2025

dmitrivMS

auto-merge was automatically disabled

December 15, 2025 21:43

Pull request was closed

@eleanorjboyd