#NEWLINE# def test_multiple_writes( self ) : #NEWLINE# #INDENT# with open ( TESTFN , 'wb' ) as testfile : #NEWLINE# #INDENT# testfile . write ( b'ababagalamaga' ) #NEWLINE# f = self . create_file ( framesize ) #NEWLINE# f . setnframes ( self . nframes ) #NEWLINE# framesize = ( self . nchannels * self . sampwidth ) #NEWLINE# f . writeframes ( self . frames [ : ( - framesize ) ] ) #NEWLINE# f . writeframes ( self . frames [ ( - framesize ) : ] ) #NEWLINE# f . close ( ) #NEWLINE# #UNINDENT# with open ( TESTFN , 'rb' ) as testfile : #NEWLINE# #INDENT# self . assertEqual ( testfile . read ( 13 ) , b'ababagalamaga' ) #NEWLINE# self . check_file ( testfile , self . nframes , self . frames )