Learning Python Testing by Daniel Arbuckle published in November 2014 by Packt Publishing, is as far as I know a second edition of sorts of another book (published in 2010) by the same author and publisher. I haven’t read the other book, but if I understand correctly there have been radical changes such as the switch to Python 3. The book has the following 9 chapters:
- Python and Testing is a an introductory chapter, which describes the different types of testing. I missed the concept of the Pyramid of testing in this chapter.
- Working with doctest is the first chapter of two chapter on doctest. It also talks about AVL trees, which you may want to familiarize yourself with to understand the test examples.
- Unit Testing with doctest is the second chapter on doctest and it also goes deeper into unit testing.
- Decoupling Units with unittest.mock introduces mocks.
- Structured Testing with unittest continues the discussion of unit tests.
- Running Your Tests with Nose covers installing and using Nose.
- Test-driven Development Walk-through gives a fully worked out example of a personal planner project.
- Integration and System Testing goes into higher level testing. Personally, I am not a fan of this level of testing. In my humble opinion, the author could have elaborated more about the circumstances when this type of testing is appropriate.
- Other Tools and Techniques gives an overview of continuous integration and related tools.
Learning Python Testing uses non-trivial examples complete with test specifications and background information. I had trouble reading the output of some of the test scripts, because they were given as screenshots. The author gives a good overview of Python testing tools with some omissions such as BDD. Overall the book lived up to my expectations.