def test_x_round2(number, digits, result): assert result == x_round(number, digits)
def test_x_round(result, digits): assert result == x_round(12345.6789, digits) assert result == x_round(12345.6789, digits + (-0.9 if digits < 0 else 0.9))