13 Debugging and testing

This chapter covers

  • Reading tracebacks
  • Debugging your application interactively
  • Testing functions
  • Testing a class

Completing a programming project from scratch to production is like building a house. After you lay out the foundation, set up the frames and walls, complete the roof, and install the doors and windows, you feel that most of the house is done. But when you proceed to interior decoration, such as flooring, lights, furniture, and closets, you’ll realize that it’s still far from completion.

You’ve worked hard on your application for three months, feeling that you’ve completed 90% of the project. Before you push it into production, however, you must ensure its performance by debugging and testing it rigorously. ...

Get Python How-To 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.