BrainBlog is the Brains4All weblog. Established 2004 in The Netherlands. Brains have been working in IT since 1983, working on the internet since 1993, and using their own agile development process for design and application development since 2003. We talk about about design and usability, the industry of software and web development, web applications and simplicity, beautiful and spectacular things.



taskcoach.png python-logo.gif

Today, I received a boot course in test driven development in Python. I had the chance to do some work on the categories filter in Task Coach together with the author. Task Coach is a simple open source stand alone to-do manager to manage personal tasks and to-do lists written in Python.
We found some unpredictable behavior in the categories filter and changed the tests to get the expected behavior. Then we changed some of the code to get the tests to pass. That went quite well, we had to write out a piece of code that was pretty cryptic but we got the tests to pass within a short while.
We were talking about acceptance tests and decided to run them by hand. We found the code now handled the behavior correctly but in the GUI the behavior was reversed!
In the code the solution was pretty obvious, still instead of diving straight in and fixing it we had to write a test first. That particular part of the GUI did not have a test yet so we had to implement a test script for that part, instantiate the (test) widgets and then write our test. That took a little bit more time. Still after a half hour or so we had fixed the first unnecessary negative in the GUI code and had a clear view of how to solve the other.
Was it worth the extra time? Yes, because now we feel more at ease testing GUI code, we understand the GUI code and GUI code testing better and next time we’ll be more careful to put in false negatives. ;)
I’m grateful I had this experience today because now I can stop procrastinating and dive into Python again. I’d like to play around with Twisted, which I will clearly need for this new tool I’ve been thinking about.


Recent entries



Sign up today