#NEWLINE# def test_streaming_tell( self ) : #NEWLINE# #INDENT# fp = BytesIO ( b'foo' ) #NEWLINE# resp = HTTPResponse ( fp , preload_content = False ) #NEWLINE# stream = resp . stream ( 2 , decode_content = False ) #NEWLINE# position = 0 #NEWLINE# position += len ( next ( stream ) ) #NEWLINE# self . assertEqual ( 2 , self ) #NEWLINE# self . assertEqual ( position , resp . tell ( ) ) #NEWLINE# position += len ( next ( stream ) ) #NEWLINE# self . assertEqual ( 3 , position ) #NEWLINE# self . assertEqual ( position , resp . tell ( ) ) #NEWLINE# self . assertRaises ( StopIteration , next , stream )