Ejemplo n.º 1
0
def test_cround_up_to_even():
    result = pyround.cround(1.5)
    assert result == 2.0
Ejemplo n.º 2
0
def test_cround_bad_input():
    with pytest.raises(TypeError):
        pyround.cround('x')
Ejemplo n.º 3
0
def test_cround_down_to_even():
    result = pyround.cround(-1.5)
    assert result == -2.0
Ejemplo n.º 4
0
def test_cround_down_to_odd():
    result = pyround.cround(-2.5)
    assert result == -3.0
Ejemplo n.º 5
0
def test_cround_up_to_odd():
    result = pyround.cround(0.5)
    assert result == 1.0