Chapter 4. Getting organized

 

This chapter covers
  • How to plan programs more thoroughly
  • Testing programs using unit tests

 

Until now, you’ve been learning how to use Python, and programming has been “by the seat of your pants.” Hunt the Wumpus didn’t have much in the way of planning and no tests at all, and, although you tested in the last chapter, you did so only fairly lightly. Now, you’ll change tactics and focus on how to plan and test programs more thoroughly. You’ll also do some more tricky things with functions and learn about pickle and text-wrap, two more of Python’s standard libraries.

The major change in this chapter is that you’ll start learning how to test programs automatically. Unit tests are a relatively recent idea and ...

Get Hello! Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.