VSCode Test Explorer hangs despite no errors in the output & all tests being collected (in the output)

I have been having a lot of issues with Test Explorer in VSCode. It has been working fine up until last week. I was writing new tests and clicked "Refresh Tests" and then it suddenly (and pretty randomly) stopped working - specifically it "discovers" tests forever.

enter image description here

And that is despite the fact that the output shows that the tests seem to be discovered correctly in the output window: enter image description here

The tests are also all passing if I run them with standard pytest terminal command: enter image description here

My directory structure is as follows:

application
├── backend
│   ├── src
|   ├── |── __init__.py
|   ├── |── manage.py
|   ├── |── app1
|   ├── |── ├── __init__.py
|   ├── |── ├── folder1
|   ├── ├── ├── ├── __init__.py
|   ├── |── ├── ├── views.py
|   ├── |── ├── ├── class1.py
|   ├── |── ├── ├── class2.py
|   ├── ├── ├── ├── tests
|   ├── ├── ├── ├── ├── __init__.py
|   ├── ├── ├── ├── ├── test_class1.py
|   ├── ├── ├── ├── ├── test_class2.py
|   ├── ├── ├── ├── ├── test_views.py
|   ├── |── ├── folder2
|   ├── ├── ├── ├── __init__.py
|   ├── |── ├── ├── views.py
|   ├── |── ├── ├── class1.py
|   ├── |── ├── ├── class2.py
|   ├── ├── ├── ├── tests
|   ├── ├── ├── ├── ├── __init__.py
|   ├── ├── ├── ├── ├── test_class1.py
|   ├── ├── ├── ├── ├── test_class2.py
|   ├── ├── ├── ├── ├── test_views.py
|   ├── |── app2
|   ├── |── ...
|   ├── pytest.ini
│   ├── Dockerfile
│   ├── Dockerfile.dev
And my settings.json file is currently this (I tried all sorts of different settings in accordance with various articles on Stack Overflow, but none has worked so far): enter image description here

One other thing that happens is that I cannot cancel test discovery or restart it. If I try, I do get an error that it has already started and cannot be restarted: enter image description here

I hope somebody can help, because I am slowly losing my mind over this :(.

Move back to the previous python version (2024.22.0) the 2024.22.1 is broken right know for some config

see this link for more infos : https://github.com/microsoft/vscode-python/issues/24655

Вернуться на верх