@pytest.mark.parametrize('in_,expected', [
    ['', ()],
    ['TEST', (0, 1, 2, 3)],
    ['!\033[31mRed\033[0m', (0, 6, 7, 8)],
    ['\033[1mA \033[31mB \033[32;41mC \033[0mD', (4, 5, 11, 12, 21, 22, 27)],
])
def test_build_color_index(in_, expected):
    actual = build_color_index(in_)
    assert actual == expected
Test function.
dataset/ETHPy150Open Robpol86/colorclass/tests/test_search.py/test_build_color_index