Fix float repr() test for Python <2.7