Python 2 hack, tests now pass on Python 2.7

One remaining failure on Python 2.6, apparently due to Python
automatically truncating floats to integers.

This commit does seem to work, but quite why and if there is a
more appropriate change currently eludes me.