示例#1
0
def test_convert_from_centimeters_to_inches(input_argument, expected_output):
    assert convert(input_argument, "in") == expected_output
示例#2
0
def test_with_mixed_case_formats():
    expected = 153.67
    assert convert(60.5, "CM") == expected
示例#3
0
def test_non_numeric_value():
    with pytest.raises(TypeError):
        convert("153.67", "in")
示例#4
0
def test_unsupported_formats():
    with pytest.raises(ValueError):
        convert(300, "km")