def test_real_distance(): reals = Real(1, 10) for i in range(1, 10 + 1): assert_equal(reals.distance(4.1234, i), abs(4.1234 - i))