Pycharm 4.0.4 cannot run the file, instead displays "Run Doctests" in the context menu

I copied the .py file from my teacher and uploaded it to the project in Pycharm 4.04. When I tried to right-click and run it, it shows "Run Doctests in" foo.py "instead of the usual" Run "foo.py", and I canโ€™t find out how to run it in normal mode.

I searched for โ€œdoctestโ€ in the settings and found nothing, and the PyCharm documentation does not say anything about disabling doctrines here.

I found a similar question here: Pycharm will not let the file run. Shows only the unittest option. and tried the proposed solution, but it still showed "Run Doctrines in" foo.py "in the context menu.

+6
source share
1 answer

I have the same Run 'Doctests in __init __' problem with PyCharm 2016. I am not sure if this is due to the same problem as other people, but this is my fix.

I noticed a file that will not start life in the resource directory:

click here for image

As soon as I opened a new PyCharm project using a script, I want to run it not in the resource directory, PyCharm ran it without any problems.

+3
source

Source: https://habr.com/ru/post/982743/


All Articles