Related Entries

India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML

« Python Task Planner
» Law, with a twist

PyTextile unit tests

I really liked Mark Pilgrim's code for implementing unit tests for his PyTextile plugin. I think I like Textile too.

I used MT-Textile to post some entries on my blog. For no real reason, I switched back to using straight HTML. I guess the reason (or excuse) at the time was that I had to use Zope STX, reST and MoinMoin formatting in addition to Textile on any given day, then. All these formats were driving me nuts.

But, that is not this post is really about! I downloaded Mark Pilgrim's PyTextile and used it a bit - not for my blog, but for something else.

What really caught my eye is how Mark has programmed unit tests. Using simple YAML - yeah, no more angle brackets - he has a very easy system to keep adding more test cases. The code that runs these tests is also pretty self-explanatory. I love it.

I'm trying to like Java. May be something as simple as this will help! Need to explore Java's unit testing framework a little more.

Short opinion: reST might be a little too heavy for posting short notes on the blog. Zope STX, with its requirement for indentation, is not at all suitable for editing on a web textarea. I'm considering using Textile again. These days, I don't have to remember other formatting details as much. And Textile, with my experience so far, is actually pleasant to type into a textarea.

  1. I agree that reST can be too much to deal with for short little entries. But it does have the most thought applied behind its design. I'm really disappointed in some of Textile's choices for markup. In particular, I'm really disappointed in their inline URL method of "name":url. This often has problems with Zope STX, which uses a similar format, because it doesn't always capture URL endings correctly. The people working on reST thought long and hard about how to deal with inline URL's and their result leads to my favorite mantra: "no alarms and no surprises". Textile and Zope STX both have too many alarms and too many surprises. And the latest Textile specs seem to be succumbing to the weight of too many cryptic features. Again - the reST team seems to really spend time considering all the alternatives, and documents what those alternatives where and why a particular syntax was chosen. This is a very nice feature of how that group works.

    After my brief experience with Textile, I decided to stick with just entering simple HTML for my weblog entries. No alarms, no surprises.

    Posted by: J.Shell on August 24, 2003 01:13 PM
  2. You got that right on - textile still gives me alarms and surprises. I find myself using HTML anyway, within Textile.

    reST is very well designed. I use it heavily for documentation - actually I'm just about to take back the opinion that it might be too heavy for short entries.

    One issue with reST I've is that converters are available in Python. Not a bad thing, but it becomes a pain to use it in tons of Perl software out there; Movable Type for example.

    Posted by: Babu on August 26, 2003 06:02 AM