Chapter 5. Unit Testing and Refactoring

Here is a quick recap of what you have learned so far. You developed a command-line application using the OOP approach, and then learned techniques to make your code robust by handling exceptions. You modularized the code, prepared a distribution, and released it to a broader audience. Finally, you learned about coding standards and documentation.

So far, we have not paid much attention to testing the application. We relied solely on manual testing, where some features were tested by playing the game. The task of manual testing becomes increasingly difficult with the complexity of the application. Soon you will be overwhelmed, and the bugs will start to creep in. While manual testing may not be avoided completely, ...

Get Learning Python Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.