PyCharm and Nosetests

I have to say that this is really really un-obvious, but after a lot of trying (or a wasted hour) here is the solution.

I have a folder in my Denim project called tests (I’m sure you can guess what is in that folder…) from the command line running all the tests in that folder is pretty straight forward, point nose at the folder and my tests execute.

So I add a nosetests run configuration in PyCharm point it at my test folder and:

Ran 0 tests in 0.000s

Ok not quite what I was expecting, the PyCharm docs are similarly unhelpful, even mentioning that I need to fill out a pattern field that isn’t even on the form (looks a lot like documentation was cloned from Unittest documentation).

Anyway turns out the solution is really simple, check the Params option and enter –all-modules tests now all complete.

Happy testing! (you do write tests don’t you 😉 )


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: