According to the http://nose.readthedocs.io/en/latest all tests
... should consider using Nose2, py.test, or just plain unittest/unittest2.
However, I can't seem to make Pycharm use it instead of nose. Is there some setting I can configure so that it uses nose2 to do its testing instead of nose?
EDIT: Nose2 is included in my Project Interpreter's list of packages
However, I can't run any tests (which is why I asked this question)
In the current version of Pycharm (2.6) there should be a context menu "run Nosetests in ..." on a test file. If this is missing, go to file->settings->Project Settings->python integrated tools and ensure the Default Test Runner is Nosetests.
To set a test runner, press Ctrl+Alt+S to open the IDE settings and select Tools | Python Integrated Tools, and then select the target test runner from the Default test runner list.
I went to run -> run... -> edit configurations and then setup a new python (not python test) config that ran module name: nose2 and my test package name for the parameters. That is parameters: tests.test_my_fun_test
Make sure that the python interpreter is set to the one you intended to use. (Like the project default) and that that interpreter has nose2 installed.
Also, in the pycharm editor window when looking at the code for a unittest class, right clicking on a test class name brings up a menu with "run unittests for..." which seems to do the correct thing. ( I have no idea if it is running nose2 or not but it works nicely)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With