How can I run nosetest from script


How I configure pyCharm to run nosetests from script file like this:

  1. !/bin/sh

export BROKER_URI='rabbitmq://'
export DB_URI=mysql://my_user:my_password/mydb
export PYTHONPATH=product_1:product_2:product_3:core
export DIR_CONF=my_project/module1/

nosetests product_1/tests product_2/tests

I always get this error:
ValueError: Unable to load tests from file /home/myuser/dev/PyCharmProjects/my_project/dev/bin/

Thanks in advance

Best regards
Comment actions Permalink
PyCharm needs to be able to provide a custom test runner in order to report the test execution graphically, so it's unable to run tests through a shell script. Looks like all your script does is set environment variables; you can define them in the PyCharm run configuration settings too.
Comment actions Permalink
I see. I have to configure at Interpreter=>Environment variables all the export from shell script.

In my case, I got several directories with integration tests which requiere other environments variables.
It's possible to exclude one or two directories if I've checked All in folder option?

Thanks a lot

Please sign in to leave a comment.