@@ -89,30 +89,25 @@ def really_finalize():
8989 ret = {}
9090 ret ['status' ] = 'ok'
9191 ret ['passed_test' ] = False
92-
93- assert single_var_to_compare
9492 ret ['var_to_compare' ] = single_var_to_compare
9593
96- if user_trace_final_entry ['event' ] == 'return' : # regular termination
94+ if user_trace_final_entry ['event' ] == 'return' : # normal termination
9795 if single_var_to_compare not in user_trace_final_entry ['globals' ]:
9896 ret ['status' ] = 'error'
9997 ret ['error_msg' ] = "Error: output has no global var named '%s'" % (single_var_to_compare ,)
10098 else :
101- expect_val = expect_trace_final_entry ['globals' ][single_var_to_compare ]
102- test_val = user_trace_final_entry ['globals' ][single_var_to_compare ]
103-
104- ret ['test_val' ] = expect_val
105- ret ['expect_val' ] = expect_val
99+ ret ['expect_val' ] = expect_trace_final_entry ['globals' ][single_var_to_compare ]
100+ ret ['test_val' ] = user_trace_final_entry ['globals' ][single_var_to_compare ]
106101
107102 # do the actual comparison here!
108- if expect_val == test_val :
103+ if ret [ ' expect_val' ] == ret [ ' test_val' ] :
109104 ret ['passed_test' ] = True
110105
111- # find the INITIAL value of single_var_to_compare by finding its
106+ # get the INITIAL value of single_var_to_compare by finding its
112107 # FIRST occurrence in user_trace
113108 #
114109 # NB: This means that the initialization code for the input can
115- # only span ONE instruction . i.e., it must be a primitive
110+ # only span ONE Python source line . i.e., it must be a primitive
116111 # literal assignment and not a data structure that's built up
117112 # incrementally over several steps.
118113 for e in user_trace :
0 commit comments