Beispiel #1
0
def test_index_start_stop():
    p = Parameter("Z", [VAL_1, VAL_2, VAL_3, VAL_4])

    error_message = re.escape(f"{repr(VAL_4)} is not in list")
    with pytest.raises(ValueError, match=error_message):
        p.index(VAL_4, 0, 2)
Beispiel #2
0
def test_index():
    p = Parameter("Z", [VAL_1, VAL_2, VAL_3, VAL_4])

    index = p.index(VAL_3)

    assert index == 2