Tuesday, May 27, 2008

blog.update(recent_events)

I have resolved the failing test issues I had on Ubuntu.

It was a bug in testing the content equality of two lists; one was the return value of a function, the order of which could not be guaranteed. Odd that it was only an issue on Ubuntu, and presumably the linux platform in general. I commited a patch that fixed it.

At the moment I am working on creating a script, and supporting test structuring, to automate test stubbing for all units that are not tested.

This is so I can pick off the tests more methodically. Also, if it's possible to get a large group of people writing tests, just one at a time each week, a lot could very quickly get done. How to reduce the overhead so that is worthwhile and easy to be assigned one unit and write some tests?

The basic idea is to have a naming convention (possibly renaming existing tests) for tests that makes it easy to see if units are tested. A one 2 one mapping of callable to test.

test_$Class__$callable__$description

$Class if a method
$callable
$description if any / optional


At the moment the script just creates test stubs for all "public" callables in the pygame package with that naming convention. It appends the callable's doc string as a comment.

def test_Surface__get_colorkey(self):
"""
TODO: Test for unit, get_colorkey

"""


# Docstring:

# Surface.get_colorkey(): return RGB or None
# Get the current transparent colorkey


self.assert_(not_completed())


I am still fleshing out the idea

No comments: