Fix tests in Python 2

math.ceil returned a float in Python 2.