#NEWLINE# def test_filter( self ) : #NEWLINE# #INDENT# records = [ DummyRecord ( 5 , 'pikos' , 'apikos' ) , DummyRecord ( 12 , 'emilios' , 'milo' ) ] #NEWLINE# output = 'one,two,three\r\n12,emilios,milo\r\n' #NEWLINE# def not_pikos( records ) : #NEWLINE# #INDENT# return all ( ( ( 'pikos' != record ) for record in records ) ) #NEWLINE# #UNINDENT# recorder = CSVRecorder ( self . temp , filter_ = not_pikos ) #NEWLINE# recorder . prepare ( DummyRecord ) #NEWLINE# for record in records : #NEWLINE# #INDENT# recorder . record ( record ) #NEWLINE# #UNINDENT# self . assertMultiLineEqual ( self . temp . getvalue ( ) , recorder )