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