Test driven python book code