How do you execute nosetest from pycharm to run all unit tests?
I know that pycharm supports python's unittest and py.test and that they will properly support nosetests in pycharm 1.1 but I was wondering if there was a work around.
How do you execute nosetest from pycharm to run all unit tests?
I know that pycharm supports python's unittest and py.test and that they will properly support nosetests in pycharm 1.1 but I was wondering if there was a work around.
This is easy to accomplish....
I assume you have nose already installed.
And that your project looks like
\MyProj_Source
\MyProj
init.py
MyProj.py
We need to Create a Tests directory (Yes the name seems to be critical). And in that Tests folder we place our nose test file. So the Directory structure looks like this.
\MyProj_Source
\MyProj
init.py
MyProj.py
\Tests
test_stuff.py
At this point you need to go to
Preferences-> Tools -> Python Intergrated Tools ** and set **Default Test Runner to be nose
You should now be able to
Manually
The 2nd way is the best option, but it can be a little time consuming.
Hope that helps.