#NEWLINE# def test_read_zero_bytes( self ) : #NEWLINE# #INDENT# self . stream = self . _make_client_iostream ( ) #NEWLINE# self . stream . connect ( ( 'localhost' , self . get_http_port ( ) ) , callback = self . stop ) #NEWLINE# self . wait ( ) #NEWLINE# self . stream . write ( b'GET / HTTP/1.0\r\n\r\n' ) #NEWLINE# self . stream . read_bytes ( 9 , self . stop ) #NEWLINE# data = self . wait ( ) #NEWLINE# self . assertEqual ( data , b'HTTP/1.0 ' ) #NEWLINE# self . stream . read_bytes ( 0 , self . stop ) #NEWLINE# data = self . wait ( ) #NEWLINE# self . assertEqual ( data , b'' ) #NEWLINE# self . stream . read_bytes ( 3 , data . stop ) #NEWLINE# data = self . wait ( ) #NEWLINE# self . assertEqual ( data , b'200' ) #NEWLINE# self . stream . close ( )