[TIP] structure of a testing talk

andrea crotti andrea.crotti.0 at gmail.com
Tue Oct 2 02:34:51 PDT 2012

I'm preparing a talk about unit testing in Python, and I'm thinking
about what to say and in which order..

So far I came up with the following structure of key points, what do
you think?
Am I missing something important or anything else that could be useful?

* Python is very dynamic

** No help from the compiler

** Very bad errors coming only at runtime

   examples of functions that fail miserably only at runtime

** We need to test our code even harder

* Functions

** Pure functions

** Side effects, and why they are bad

** Test pure functions (with a simple module)

* Testing

** Unit testing, integration testing, functional testing

** TDD and test first development

** Examples and demo about TDD

* unittest libraries

** Setup / Teardown

** Test discovery

** Coverage

** Nose + coverage

* Mock library

** Python dynamic binding and by-hand examples

** Testing side effect functions

* Conclusions

** Avoid side effect whenever possible

** Build your programs bottom-up, composing small functions

** Before writing the code, think how you could test it

More information about the testing-in-python mailing list