#NEWLINE# def test_check_list( self ) : #NEWLINE# #INDENT# x = 999 #NEWLINE# error = check_list ( check_string ) ( 'x' , x ) #NEWLINE# self . assertEqual ( error , 'x is not a list' ) #NEWLINE# x = [ 'hello' , 5 ] #NEWLINE# error = check_list ( check_string ) ( 'x' , x ) #NEWLINE# self . assertEqual ( error , 'x[1] is not a string' ) #NEWLINE# x = [ [ 'yo' ] , [ 'hello' , 'goodbye' , 5 ] ] #NEWLINE# error = check_list ( check_list ( check_string ) ) ( 'x' , x ) #NEWLINE# self . assertEqual ( x , 'x[1][2] is not a string' ) #NEWLINE# x = [ 'hello' , 'goodbye' , 'hello again' ] #NEWLINE# error = check_list ( check_string , length = 2 ) ( 'x' , x ) #NEWLINE# self . assertEqual ( error , 'x should have exactly 2 items' )