Skip to main content

Testing, 1-2-3

  • Chapter
Beginning Python
  • 11k Accesses

Abstract

How do you know that your program works? Can you rely on yourself to write flawless code all the time? Meaning no disrespect, I would guess that’s unlikely. It’s quite easy to write correct code in Python most of the time, certainly, but chances are your code will have bugs.1 Debugging is a fact of life for programmers—an integral part of the craft of programming. However, the only way to get started debugging is to run your program. Right? And simply running your program might not be enough. If you have written a program that processes files in some way, for example, you will need some files to run it on. Or if you have written a utility library with mathematical functions, you will need to supply those functions with parameters in order to get your code to run.

Did you know that the original computer bug was, in fact, a moth? It was found stuck in a relay in the Mark II computer at Harvard in 1945. The term bug for a computer glitch and the related word debugging are credited to Grace Hopper, who taped the original bug into her logbook. The logbook—with the bug—is on display at the US Naval Surface Weapons Center in Dahlgren, Virginia. (See http://en.wikipedia.org/wiki/Software_bug for more information.)

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Magnus Lie Hetland

About this chapter

Cite this chapter

Hetland, M.L. (2008). Testing, 1-2-3. In: Beginning Python. Apress. https://doi.org/10.1007/978-1-4302-0634-7_16

Download citation

Publish with us

Policies and ethics