#NEWLINE# @ pytest . mark . parametrize ( 'in_,expected' , [ [ '' , ( ) ] , [ 'TEST' , ( 0 , 1 , 2 , 3 ) ] , [ '!\x1b[31mRed\x1b[0m' , ( 0 , 6 , 7 , 8 ) ] , [ '\x1b[1mA \x1b[31mB \x1b[32;41mC \x1b[0mD' , ( 4 , 5 , 11 , 12 , 21 , 22 , 27 ) ] ] ) #NEWLINE# def test_build_color_index( in_ , expected ) : #NEWLINE# #INDENT# 'Test function.\n\n    :param str in_: Input string to pass to function.\n    :param str expected: Expected return value.\n    ' #NEWLINE# actual = build_color_index ( expected ) #NEWLINE# assert ( actual == expected )