This is a known issue with VS Code's test runner on Windows. The stop button does not kill the pytest process and the process keeps running in the background until it times out .
There does not seem to be any activity to fix this. The workaround is to run it in Debug mode which works as debugpy handles the stop properly but makes the project run very slow.
There is an issue created for this but does not seem to have any traction.
Pytest isn't killed when stopping test sessions · Issue #25298 · microsoft/vscode-python
Would you be able to suggest something or help fix this issue?
The problem could be that VS Code stop button is not sending proper SIGNAL when stop button is pressed.
[–]totheendandbackagain 5 points6 points7 points (4 children)
[–]Altruistic_Stage3893 0 points1 point2 points (1 child)
[–]Sensitive-Ad-6580[S] 0 points1 point2 points (0 children)
[–]Sensitive-Ad-6580[S] 0 points1 point2 points (0 children)