Thu, 13 Feb 2003
Testing Python code

I've spent a while over the last few weeks tinkering with the cgi form handling code in Roundup. Early on I wrote unit tests - I knew the code was going to get complex, and I wanted to ensure correctness. More recently, that complexity has arrived and I had a further wish to make sure I was exercising every line of the form handling code, including the error branches. In comes pytrace.

Anthony mentioned Skip's Python Statement Coverage Testing tool, pytrace (or, more accurately, "trace.py"), a while ago.

It took me a while to get going. The biggest reason is that it doesn't work with Python 2.1. Python 2.2 is fine though. Once I had run it, I found that there were in fact some branches of the code I wasn't testing in the unit tests. Now I know, and I can remedy the situation.

path: /python | permanent link |
Sob sob sob

The PyCon schedule has started taking shape. Another year with what looks like an awesome conference and I'm not going to be able to go. I really hope that everyone who does go has an amazing time!

path: /python | permanent link |
... home of the brave

Yeah, right. Drugs used to make inmate sane enough to die.

path: /stuff | permanent link |
Free software's next hurdle: the download URL

Over at techdirt, Mike says:

It ain't easy being free, these days. While it used to be simple to create a piece of software and put it up on any one of a number of download sites for "free software", the world is now changing (and charging). Plenty of download sites are now charging fees to either software developers or to downloaders. This makes it a tougher proposition if you want to give away free software.

He goes on to propose that P2P systems (presumably such as Freenet or the newer The Circle) may provide a solution to this problem.

This is an interesting issue that the the Python "CPAN" effort that I'm involved in (PyPI) has started looking into recently. It's easy enough to add a metadata field to the package index called "download URL", but there's all sorts of problems associated with this:

  1. The URL linked to "goes away" - the provider goes out of business, decides to no longer support the software, ...
  2. There is no single URL - see sourceforge and its web of mirrors (yes, this can be solved with a list of URLs, but then that list must be maintained and is subject to the problems of step 1)

There's probably other issues we haven't thought about yet. Wouldn't it be nice if there was a well-supported (ie. widely adopted) P2P system already out there?

path: /stuff | permanent link |