Chapter 4: Test Classes

Noah Gift

The devil is in the details with most of the technology. It is easy to say things like TDD (Test-driven development) is the “only” way to write software. Test-driven development is a method of writing software where a test creates; then the code will complete it. It is also easy to talk about the benefits of object-oriented programming with Unit Testing.

In theory, yes, TDD seems like a good idea. Who wouldn’t want 100% test coverage? In practice, though, this is an expensive operation and not worth the ROI. Even further, it may not also be possible to do realistically. How many real-world examples are there of projects that have been around for several years and completed TDD? Highly experienced and competent ...

Get Testing In Python 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.