def test_raises_error_invalid_value_type(): with pytest.raises(ValueError): convert_length_unit(1.0, 'a', 'English2')
def test_raises_error_invalid_unit_value(): with pytest.raises(ValueError): convert_length_unit(1.0, SynergiValueType.SUL, 'English3')
def test_convert_units(value, value_type, length_unit, expected): actual = convert_length_unit(value, value_type, length_unit) assert actual == expected