O'Reilly logo

Hello! Python by Anthony Briggs

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 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 ...

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