<s> """<STR_LIT>""" <EOL> from logbook import Logger , StreamHandler , NullHandler <EOL> from cStringIO import StringIO <EOL> log = Logger ( '<STR_LIT>' ) <EOL> class CustomStreamHandler ( StreamHandler ) : <EOL> def should_handle ( self , record ) : <EOL> return False <EOL> def run ( ) : <EOL> out = StringIO ( ) <EOL> with NullHandler ( ) : <EOL> with CustomStreamHandler ( out ) as handler : <EOL> for x in xrange ( <NUM_LIT> ) : <EOL> log . warning ( '<STR_LIT>' ) <EOL> assert not out . getvalue ( ) </s>
