예제 #1
0
def test_x_round2(number, digits, result):
    assert result == x_round(number, digits)
예제 #2
0
def test_x_round2(number, digits, result):
    assert result == x_round(number, digits)
예제 #3
0
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))
예제 #4
0
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))