"New developerWorks columnist Evelyn Mitchell follows up her
first Python article, which introduced you to the Python
programming language. In this installment, Evelyn explains the
virtues of unit testing as you write a program, and looks at
PythonUnit, a testing tool, using some short sample programs to
illustrate the tool and further expose you to programming with
"Unit testing is the process of testing code as you write it.
You can also use unit testing during regression testing, in which
you determine if a program is working the way it did before you
modified it. Unit testing is also known as "white box" or "glass
box testing," as opposed to "black box testing."
"Black box testing is, roughly speaking, testing done by someone
who does not have access to the program's code. In black box
testing the program is viewed (you might have guessed) as a black
box that takes inputs and produces outputs, but doesn't reveal its
internal structure. By contrast, unit testing exercises your full
knowledge of the code by testing the interfaces to other code
components and to user space, as well as the implementation."
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.