#NEWLINE# def test_max_size( self ) : #NEWLINE# #INDENT# with TempDirectory ( ) : #NEWLINE# #INDENT# self . create ( { #NEWLINE# #INDENT# 'filename' : 'output.log' , #NEWLINE# 'max_size' : 16 , #NEWLINE# #UNINDENT# } ) #NEWLINE# map ( self . input . put , self . events ) #NEWLINE# self . waitForEmpty ( ) #NEWLINE# self . assertFileContents ( ( self . events [ 0 ] . to_json ( ) + '\n' ) , 'output.log.1' ) #NEWLINE# self . assertFileContents ( ( self . events [ 1 ] . to_json ( ) + '\n' ) , 'output.log' ) #NEWLINE# self . assert_ ( self . output . qsize ( ) ) #NEWLINE# events = [ self . output . get ( ) for i in xrange ( self . output . qsize ( ) ) ] #NEWLINE# assertEventEquals ( self , Event ( tags = [ 'fileroll' ] , filename = 'output.log.1' , last = self . events [ 0 ] , trigger = i . events [ 1 ] ) , events [ 1 ] )