Reputation: 1461
I'm new to PyCharm. How do I set options for nosetests when running doctests from PyCharm? In Eclipse PyDev, this setting is under Window > Preferences > PyDev > PyUnit
; I select the "Nose test runner" and set "Parameters for test runner" as follows:
--verbosity 0
--with-doctest
--doctest-tests
--doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE
Any help on doing the same in PyCharm is highly appreciated.
Upvotes: 2
Views: 2487
Reputation: 26462
Go to Run > Edit Configurations
, which will open a window as shown below.
click on the green +
button on the top left to add a configuration. Select Python tests then Nosetests.
Select the test scope using the radio button and fill up the relevant input boxes.
check the Params
checkbox and in the input box next to Params
is where you enter the parameters. enter them separated with a space, as you would do with a terminal. Now click OK
You can have multiple test configurations. To remove a configuration, use the red -
button.
now select the configuration you wish to run and press the green run button.
PS: Invalid configurations show a cross mark on the configuration icon.
Upvotes: 4