#NEWLINE# def test_ctor_start_nonzero_shorter_than_buffer( self ) : #NEWLINE# #INDENT# from io import BytesIO #NEWLINE# CONTENT = b'CONTENT GOES HERE' #NEWLINE# START = 8 #NEWLINE# BUFSIZE = 10 #NEWLINE# stream = BytesIO ( CONTENT ) #NEWLINE# stream . read ( START ) #NEWLINE# bufstream = self . _makeOne ( stream , START , BUFSIZE ) #NEWLINE# self . assertTrue ( ( bufstream . _stream is stream ) ) #NEWLINE# self . assertEqual ( bufstream . _start_pos , START ) #NEWLINE# self . assertEqual ( bufstream . _buffer_pos , 0 ) #NEWLINE# self . assertEqual ( bufstream . _buffered_data , CONTENT [ START : ] ) #NEWLINE# self . assertEqual ( len ( bufstream ) , ( len ( CONTENT ) - START ) ) #NEWLINE# self . assertTrue ( bufstream . stream_exhausted ) #NEWLINE# self . assertEqual ( bufstream . stream_end_position , len ( CONTENT ) )