Change assertion to make it work with Python 2.6

We should at some point probably wrap assert_greater and assert_less, but here
it does not really make a functional difference, so I chose the easy way.