PyCharm/Python. Code doesn't run. Immediately receiving "Getting Process finished with exit code 0"

Pavel Zagalsky picture Pavel Zagalsky · Feb 21, 2017 · Viewed 11.8k times · Source

I recently switched my workstation and reinstalled all my environment on Fedora 25. When attempting to run any part of my project (I run PyTest tests) I always end up getting "Process finished with exit code 0" message in debug.

Here's the full debug message:

    /usr/bin/python2.7 /usr/share/java/pycharm-community/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 46537 --file /home/pavel/Documents/integration_tests/cfme/tests/containers/test_containers_default_project_replicators.py
warning: Debugger speedups using cython not found. Run '"/usr/bin/python2.7" "/usr/share/java/pycharm-community/helpers/pydev/setup_cython.py" build_ext --inplace' to build.
pydev debugger: process 10166 is connecting

Connected to pydev debugger (build 163.10154.50)
/home/pavel/Documents/integration_tests/utils/log.py:222: UserWarning: clearing configuration is bad
  del(conf['env'])

The project I am trying to run is actually open sourced and is here for reference: https://github.com/ManageIQ/integration_tests

Answer

Pavel Zagalsky picture Pavel Zagalsky · Feb 21, 2017

Ok, so the problem was that the I tried to run it as Python Run/Debug configuration instead of Py.test run/debug configuration.

From How do I configure PyCharm to run py.test tests?

Please go to File | Settings | Tools | Python Integrated Tools and change the default test runner to py.test. Then you'll get the py.test option to create tests instead of the unittest one.