#NEWLINE# def run( ) : #NEWLINE# #INDENT# out = StringIO ( ) #NEWLINE# with StreamHandler ( handler ) as handler : #NEWLINE# #INDENT# for x in xrange ( 500 ) : #NEWLINE# #INDENT# log . warning ( 'this is not handled' ) #NEWLINE# #UNINDENT# #UNINDENT# assert ( out . getvalue ( ) . count ( '\n' ) == 500 )