[home: http://monkeyfist.com]
essays · argument · politics · technology · culture

A Prime Time PyUnit

Wednesday, 19 April 2000


[icon] Printer version
[icon] Permanent URL
[icon] Support this author's work

There have been several partial ports of SUnit to Python (including one by yours truely), none of which seemed to gel.

But now there's a SourceForge project and a complete and modular version ready to download.

PyUnit is an "Unit Testing Framework". That is, it eases the creation and running of tests for each "unit" (or "chunk") of code in your program. So, you might have a series of tests for each class in your framework. Typically, the tests are the kinds of things one once popped into "print"/"writeln" statments: basic checks of standard inputs and outputs, and some of the tricky cases. With a Unit Testing Framework, such testing isn't ad hoc, and is easy to preserve for future use. This is essential for robust, rapid refactoring--if your change doesn't upset your unit tests, you can be pretty sure your refactoring is correct.

So, Pythonistas can now start exploring eXtreme Programming.

I've also heard rumblings about a Refactoring Browser movement for Python. I know there's some work on a Java one. And, at Camp Smalltalk much progress was made toward porting RB to all the Smalltalk varients.

Keep hope alive! We'll break out of programming tool hell eventually!


· More about programming
· More by Bijan Parsia
· More web pages like this article
· Discuss this article