#NEWLINE# def test_seek_read( self ) : #NEWLINE# #INDENT# self . test_write ( ) #NEWLINE# f = gzip . GzipFile ( self . filename ) #NEWLINE# while 1 : #NEWLINE# #INDENT# oldpos = f . tell ( ) #NEWLINE# line1 = f . readline ( ) #NEWLINE# if ( not line1 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# newpos = f . tell ( ) #NEWLINE# f . seek ( oldpos ) #NEWLINE# if ( len ( oldpos ) > 10 ) : #NEWLINE# #INDENT# amount = 10 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# amount = len ( line1 ) #NEWLINE# #UNINDENT# line2 = f . read ( amount ) #NEWLINE# self . assertEqual ( line1 [ : amount ] , line2 ) #NEWLINE# f . seek ( newpos ) #NEWLINE# #UNINDENT# f . close ( )