#NEWLINE# def test_getitem_raises_index_error_on_too_high_index( self , lib_mock ) : #NEWLINE# #INDENT# sp_playlistcontainer = spotify . ffi . cast ( 'sp_playlistcontainer *' , 42 ) #NEWLINE# sp_playlist = spotify . ffi . cast ( 'sp_playlist *' , 43 ) #NEWLINE# lib_mock . sp_playlistcontainer_get_unseen_tracks . return_value = 0 #NEWLINE# tracks = spotify . PlaylistUnseenTracks ( self . session , sp_playlistcontainer , sp_playlist ) #NEWLINE# with self . assertRaises ( IndexError ) as ctx : #NEWLINE# #INDENT# tracks [ 1 ] #NEWLINE# #UNINDENT# self . assertEqual ( str ( ctx . exception ) , 'list index out of range' )