Unable to run/debug unit tests

Answered

Hi everyone,

I'm unable to run pytest tests from the IDE. When I click on the “play” symbol, the symbol is greyed out and nothing is happening. The same happens when I want to debug tests.

Normal Python scripts are not affected. I can start and debug them normally.

This happens for me with every project.

I'm currently using PyCharm 2025.2.1 but this also occured with the version before.

4
2 comments

I am having an identical problem as of today, also in PyCharm 2025.2.1. I have not encountered this problem before.

When I right click on my “tests” folder and click “run ‘pytest in tests’”, nothing happens. When I go to do it again, the option is greyed out. I can similarly click “debug ‘pytest in ’tests'” one time, and see nothing happen, after which the option is greyed out. I can also click on “run ‘pytest in <test_file_name>’” once for each file, after which nothing happens, and that option is subsequently greyed out.

Note that there is no indication anywhere of any tests running, or any ability to “stop” tests that might be running.

0

This is related to the following regression on 2025.2.1: https://youtrack.jetbrains.com/issue/PY-83799/Update-2025.2.1-Can-not-run-or-debug-pytest-tests

Please subscribe to receive updates, we will fix in the next minor version. As of now, use the Toolbox App to manage your IDE instances and install the previous version 2025.2 

1

Please sign in to leave a comment.