Skip to content

VS Code cannot cancel test #25115

Open
Open
@ThierryOyhanto

Description

@ThierryOyhanto

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.100.2
  • OS Version: Windows 11 Pro 23H2

Steps to Reproduce:

  1. Create new folder and open it with vs code
  2. create virtualenv .env (Python 3.9)
  3. activate .env and pip install pytest
  4. create test file test_cancelTests.py
  5. add following code
import time

def test_tests():
    time.sleep(1000)
    pass
  1. select Python Interpreter .env
  2. configure test for Pytest
  3. execute test in test explorer
  4. Cancel test with "Cancel Test" button

Result : python process still running 1000s
Expected : python process must exit or killed

Note : With "Python Test Explorer for Visual Studio" extension, python process exit when "Cancel Test" was pressed

(.env) C:\Temp\BUGVSCODE>pip list
Package           Version
----------------- -------
colorama          0.4.6
exceptiongroup    1.3.0
iniconfig         2.1.0
packaging         25.0
pip               25.1.1
pluggy            1.6.0
pytest            8.3.5
setuptools        80.0.1
tomli             2.2.1
typing_extensions 4.13.2
wheel             0.45.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions