#NEWLINE# def test_chunked( self ) : #NEWLINE# #INDENT# for i in range ( 25 ) : #NEWLINE# #INDENT# self . autocomplete . store ( ( 'foo %s' % ( chr ( ( i + ord ( 'a' ) ) ) * 2 ) ) ) #NEWLINE# #UNINDENT# ge = self . autocomplete . search ( 'foo' , limit = 21 , chunk_size = 5 ) #NEWLINE# results = list ( ge ) #NEWLINE# self . assertEqual ( len ( results ) , 21 ) #NEWLINE# self . assertEqual ( results [ 0 ] , 'foo aa' ) #NEWLINE# self . assertEqual ( results [ ( - 1 ) ] , 'foo uu' )