O'Reilly logo

Mastering Object-oriented Python by Steven Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Designing for Testability

High-quality programs have automated tests. We need to use everything at our disposal to be sure that our software works. The golden rule is this: to be deliverable, the feature must have a unit test.

Without an automated unit test, the feature cannot be trusted to work and should not be used. According to Kent Beck, in Extreme Programming Explained:

"Any program feature without an automated test simply doesn't exist."

There are two essential points regarding the automated testing of program features:

  • Automated: This means that there's no human judgment involved. The testing involves a script that compares actual responses to expected responses.
  • Features: These are tested in isolation to be sure that they work ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required