#NEWLINE# def test_debug_trace( self ) : #NEWLINE# #INDENT# gen = construct_iterator ( ** { #NEWLINE# #INDENT# 'iter_x' : [ 1 , 2 , 3 , 4 , 5 ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# obj = self . obj_debug ( gen ) #NEWLINE# exp = [ 'C1' , 1 ] #NEWLINE# obs = next ( obj ) #NEWLINE# self . assertEqual ( gen , exp ) #NEWLINE# exp_trace = set ( [ ( 'wf_groupA' , 0 ) , ( 'methodA1' , 1 ) , ( 'methodA2' , 2 ) , ( 'wf_groupC' , 3 ) , ( 'methodC1' , 4 ) ] ) #NEWLINE# exp_pre_state = { #NEWLINE# #INDENT# ( 'wf_groupA' , 0 ) : [ None , 1 ] , #NEWLINE# ( 'methodA1' , 1 ) : [ None , 1 ] , #NEWLINE# ( 'methodA2' , 2 ) : [ 'A1' , 1 ] , #NEWLINE# ( 'wf_groupC' , 3 ) : [ 'A2' , 1 ] , #NEWLINE# ( 'methodC1' , 4 ) : [ 'A2' , 1 ] , #NEWLINE# #UNINDENT# } #NEWLINE# exp_post_state = { #NEWLINE# #INDENT# ( 'wf_groupA' , 0 ) : [ 'A2' , 1 ] , #NEWLINE# ( 'methodA1' , 1 ) : [ 'A1' , 1 ] , #NEWLINE# ( 'methodA2' , 2 ) : [ 'A2' , 1 ] , #NEWLINE# ( 'wf_groupC' , 3 ) : [ 'C1' , 1 ] , #NEWLINE# ( 'methodC1' , 4 ) : [ 'C1' , 1 ] , #NEWLINE# #UNINDENT# } #NEWLINE# obs_trace = self . obj_debug . debug_trace #NEWLINE# obs_pre_state = self . obj_debug . debug_pre_state #NEWLINE# obs_post_state = self . obj_debug . debug_post_state #NEWLINE# self . assertEqual ( obs_trace , exp_trace ) #NEWLINE# self . assertEqual ( obs_pre_state , exp_pre_state ) #NEWLINE# self . assertEqual ( obs_post_state , exp_post_state )