Persistent themes from PyCon:
Mocking – Looks to be heading to be part of the main Python library.
Python Profiler only shows CPU time.
Use Unix Time Command to look at wall clock and CPU time then subtract for idea of I/O Time.
Pull out methods in to free functions
Factor out parts that don’t touch attributes into a separate free function
– Design with testing in mind.
– Don’t write tests to write tests.
Mimic behavior of real objects in controlled ways.
Check out a great PyCon talk on Large Scale Testing
Don’t Test Django – Write tests for your apps.
Use __init__.py to import all sub modules.
Don’t hit the DB.
Don’t run tests that do a self.save.
NOSE can re-order tests to optimize fixture loading