IBM developerWorks: Python 101: Testing your code, Discover PythonUnit, a Unit Testing Framework | Linux Today

IBM developerWorks: Python 101: Testing your code, Discover PythonUnit, a Unit Testing Framework

Written By
Web Webster
Web Webster
Jan 9, 2000

“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
Python….

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

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.