how to disable pycharm entering pytest mode automatically

Sometime pycharm enters pytest mode automatically even the project is not a pytest project, how to avoid it? 

0

Hello,

 

PyCharm detects if the pytest package is installed in the Project Interpreter and defines the test runner. Do you have it installed? 

You can change the auto detection of the test runner in the settings: 

1

Hi.  I logged in just to ask this same question.  I appreciate your response, but it doesn't answer the question. 

First, there's no option to disable it entirely and I'm very frustrated.   I accidentally named a file something_test.py and ran it and now pycharm is trying to run absolutely everything  as a pytest, even files without test in the name. 

On top off that, I've deleted the test configurations, but I can't get back my previous right click -> run/debug options.  If I right click now, it only gives me the choice of running pytests.

I have to use the menu at the top and select a configuration to run, but before that I have to run it once.   I can't start by debugging so I have to put a sys.exit() near the top of my script, run the script once, then select run->debug from the top menu and select a configuration to run.   It's much more tedious and it's all because this pytest cancer has metastasized and taken over pycharm.

It's extremely frustrating.   Do you know how to (a) disable pytests entirely and (b) restore my previous IDE layout?  As an aside, I will say this is not the first time  PyCharm has decided to permanently change my IDE config without my requesting it and left me with no obvious way to revert it. 

Thanks.  

0

I see, thank you for the feedback!

I will refer it to the developers team to be considered. 

 

Please vote for the related request https://youtrack.jetbrains.com/issue/PY-43704/Pycharm-thinks-my-test-method-is-a-PyTest-test-and-wont-run-it-normally-Its-just-a-method in order to be notified about any updates. 

I am wondering if this workaround would work for you https://youtrack.jetbrains.com/issue/PY-43704/Pycharm-thinks-my-test-method-is-a-PyTest-test-and-wont-run-it-normally-Its-just-a-method#focus=Comments-27-4305633.0-0

0

请先登录再写评论。