chapter 10: Testing and Logging – Preparing for Bugs

Using examples as tests with doctest 1094 Testing with py.test 1110 Mock objects 1138 Logging 1141 Summary

10.1 Using examples as tests with doctest

10.1.1 Linux

Automatic Install Script

$ sudo wget -qO- https://get.docker.com/ | sh

remove hell-world

$ sudo docker rm `sudo docker ps -aq`
$ sudo docker rmi hello-world

.

10.2 Testing with py.test

10.3 Mock objects

10.4 Logging

10.5 Summary