#NEWLINE# def test_not_none_execute( self ) : #NEWLINE# #INDENT# obj = MockWorkflowReqTest ( [ None , None ] , options = { #NEWLINE# #INDENT# 'cannot_be_none' : True , #NEWLINE# #UNINDENT# } , debug = True , stats = defaultdict ( int ) ) #NEWLINE# single_iter = construct_iterator ( ** { #NEWLINE# #INDENT# 'iter_x' : [ 1 , 2 , 3 , 4 , 5 ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# exp_stats = { #NEWLINE# #INDENT# 'needs_data' : 2 , #NEWLINE# 'always_run' : 5 , #NEWLINE# 'run_if_not_none' : 5 , #NEWLINE# #UNINDENT# } #NEWLINE# exp_result = [ [ 'needs_data' , 1 ] , [ 'needs_data' , 2 ] , [ 'always_run' , 3 ] , [ 'always_run' , 4 ] , [ 'always_run' , 5 ] ] #NEWLINE# obs_result = list ( obj ( single_iter ) ) #NEWLINE# self . assertEqual ( obs_result , exp_result ) #NEWLINE# self . assertEqual ( obj . stats , exp_stats )