"Run" command missing from context menu
Figured I'd post this just in case anyone else is having the same trouble.
When I right-click in some of my Python source files, there is no "Run" command in the right-click context menu. The only way to run the file is by manually creating a run configuration. I think I finally figured out the cause.
The problem seems to be triggered by the presence of any function name that starts with "test". For example, the following function will likely prevent the "Run" command from being available in that file :
def test_foo():
print "foobar"
I assume the presence of the "test" function causes PyCharm to think that the whole file is a unittest or something.
-Brien Voorhees
Please sign in to leave a comment.
Hello Brien,
This is a bug. Could you please file an issue at http://youtrack.jetbrains.net/
?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ok, I submitted it as http://youtrack.jetbrains.net/issue/PY-1220 .
Cheers,
Brien Voorhees
This is some years ago, but still a bug. Renaming all function containing the word "test" in my script made the run buttons show up again.