nose and TDD¶
- Write tests first so you never have any wasted code
- For this, writing and running tests has t be easy
- And the tests have to be useful, especially when they fail
How laziness drove the development of NOSE¶
- traditional unittest is high-friction
- py.test is great, but hard to install and complex
- no boilerplate
Basic of Nose¶
- Extends unittest, doesn’t replace it
- use assert to test
- use print for debugging
- generative tests
Reasons to use nose¶
- nose makes it easier to write and run useful tests
- useful tests make it easier to write useful code