Newsletter

First published: July 16, 2008, 6:06 p.m.
Last edited: July 16, 2008, 6:20 p.m.

Mox

In working on Viricide, I spent a good deal of time writing unit tests for the server portion. The majority of my previous Python unit testing experience being at Google, I looked around on the internet for potentially similar solutions to write my unit tests in.

I was surprised to discover that mock-object unit test frameworks for Python essentially boiled down to the following three solutions:I didn't like any of the solutions, really, as they all seemed to have various glaring problems or inconveniences (the specifics of which I have forgotten), but I settled on Mocker as it was closest to the Google mock-object system, right after sending an email to a friend at Google requesting that they open source what I was used to.

It appears that my friend totally pulled through, sent an email to the right people, and Mox was released on Google Code in mid-June.

Though I first noticed that Mox was available for download the day Protocol Buffers were released on Google Code (Mox is included in the Protocol Buffer source distribution as it is required for unit tests), the Google blog is now announcing Mox for general availability.

I guess I'm not surprised the announcement references other former Googlers requesting it, as it's a pretty sweet mock-object system. But hooray!

Also, do check out Protocol Buffers. I'm pretty excited about them, too.