def test_cround_up_to_even(): result = pyround.cround(1.5) assert result == 2.0
def test_cround_bad_input(): with pytest.raises(TypeError): pyround.cround('x')
def test_cround_down_to_even(): result = pyround.cround(-1.5) assert result == -2.0
def test_cround_down_to_odd(): result = pyround.cround(-2.5) assert result == -3.0
def test_cround_up_to_odd(): result = pyround.cround(0.5) assert result == 1.0