Search code examples
pythonpycharmnose

How do I disable -u interpreter option in PyCharm?


I am configuring PyCharm to use remote python interpreter. PyCharm seems to execute the interpreter with -u option, and I can't find a way to disable that. The reason I need it disabled is that I am running nosetests command, so I get this:

ssh://xxx@xxx.xxx.xxx.xxx:22/path/to/bin/nosetests -s -a M_4439 -u /path/to/test_elf.py

Usage: nosetests [options]

nosetests: error: no such option: -u

Process finished with exit code 2

I looked around, and could not find where -u is set. I checked:

  • Run -> Edit configurations. I have my options there: -s -a M_4439
  • Settings -> Project interpreter

Where is -u set?


Solution

  • Answering my own question, as per comment above:

    PyCharm has its helper script to run nose tests. I configured the interpreter to be remote python and now I get this (which is what I need): ssh://xxx@xxx.xxx.xxx.xxx:22/path/to/bin/python -u /path/to/.pycharm_helpers/pycharm/noserunner.py /path/to/test_elf.py .

    Now I just need to figure out pre-test scripts that are usually sourced from .bashrc. Edit configurations -> Before launch: Remote external tool does that