diff --git a/unit-testing.html b/unit-testing.html index bdbb4d7..4ba4125 100755 --- a/unit-testing.html +++ b/unit-testing.html @@ -35,11 +35,11 @@ body{counter-reset:h1 9}

This is called test-driven development, or TDD. The set of two conversion functions — to_roman(), and later from_roman() — can be written and tested as a unit, separate from any larger program that imports them. Python has a framework for unit testing, the appropriately-named unittest module.

Unit testing is an important part of an overall testing-centric development strategy. If you write unit tests, it is important to write them early and to keep them updated as code and requirements change. Many people advocate writing tests before they write the code they’re testing, and that’s the style I’m going to demonstrate in this chapter. But unit tests are beneficial no matter when you write them.