I've been rediscovering unit testing in python lately and wanted to share some notes about this, I hope you find them useful.
There we go!
Why use an unit testing framework?
One word: Convenience
You can always run your tests manually, but the harder to run tests, the less likely you run them.
A piece of advice: be lazy, automate all the things! or even better: pick an existing framework and stick with it.
Nose is a testing framework for python, it's not included in the standard library but that's ok for me (otherwise look for
- Autodiscovering: put test functions in a module called
something_tests.pyand nose will ...