Review of Learning Python Testing

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:

  1. 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.
  2. 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.
  3. Unit Testing with doctest is the second chapter on doctest and it also goes deeper into unit testing.
  4. Decoupling Units with unittest.mock introduces mocks.
  5. Structured Testing with unittest continues the discussion of unit tests.
  6. Running Your Tests with Nose covers installing and using Nose.
  7. Test-driven Development Walk-through gives a fully worked out example of a personal planner project.
  8. 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.
  9. 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.

By the author of NumPy Beginner's Guide, NumPy Cookbook and Instant Pygame. If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Uncategorized. Bookmark the permalink.