#NEWLINE# def test_small_read_untils_from_large_buffer( self ) : #NEWLINE# #INDENT# ( server , client ) = self . make_iostream_pair ( max_buffer_size = ( 10 * 1024 ) ) #NEWLINE# try : #NEWLINE# #INDENT# server . write ( ( ( ( b'a' * 1023 ) + b'\n' ) * 100 ) ) #NEWLINE# for i in range ( 100 ) : #NEWLINE# #INDENT# client . read_until ( b'\n' , self . stop , max_bytes = 4096 ) #NEWLINE# data = self . wait ( ) #NEWLINE# self . assertEqual ( data , ( ( b'a' * 1023 ) + b'\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# server . close ( ) #NEWLINE# client . close ( )