@@ -131,11 +131,11 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
131
131
"""
132
132
if sys .version_info < (3 , 12 ):
133
133
expected += """test_stdout_tag = f"{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}"
134
- print(f"!$######{{test_stdout_tag}}######$!") """
134
+ """
135
135
else :
136
136
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
137
- print(f'!$######{{test_stdout_tag}}######$!') """
138
- expected += """
137
+ """
138
+ expected += """print(f'!$######{{test_stdout_tag}}######$!')
139
139
exception = None
140
140
gc.disable()
141
141
try:
@@ -146,12 +146,7 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
146
146
codeflash_duration = time.perf_counter_ns() - counter
147
147
exception = e
148
148
gc.enable()
149
- """
150
- if sys .version_info < (3 , 12 ):
151
- expected += """print(f"!######{{test_stdout_tag}}######!")"""
152
- else :
153
- expected += """print(f'!######{{test_stdout_tag}}######!')"""
154
- expected += """
149
+ print(f'!######{{test_stdout_tag}}######!')
155
150
pickled_return_value = pickle.dumps(exception) if exception else pickle.dumps(return_value)
156
151
codeflash_cur.execute('INSERT INTO test_results VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', (test_module_name, test_class_name, test_name, function_name, loop_index, invocation_id, codeflash_duration, pickled_return_value, 'function_call'))
157
152
codeflash_con.commit()
@@ -240,11 +235,11 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
240
235
"""
241
236
if sys .version_info < (3 , 12 ):
242
237
expected += """test_stdout_tag = f"{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}"
243
- print(f"!$######{{test_stdout_tag}}######$!") """
238
+ """
244
239
else :
245
240
expected += """test_stdout_tag = f'{{test_module_name}}:{{(test_class_name + '.' if test_class_name else '')}}{{test_name}}:{{function_name}}:{{loop_index}}:{{invocation_id}}'
246
- print(f'!$######{{test_stdout_tag}}######$!') """
247
- expected += """
241
+ """
242
+ expected += """print(f'!$######{{test_stdout_tag}}######$!')
248
243
exception = None
249
244
gc.disable()
250
245
try:
@@ -255,12 +250,7 @@ def codeflash_wrap(wrapped, test_module_name, test_class_name, test_name, functi
255
250
codeflash_duration = time.perf_counter_ns() - counter
256
251
exception = e
257
252
gc.enable()
258
- """
259
- if sys .version_info < (3 , 12 ):
260
- expected += """print(f"!######{{test_stdout_tag}}######!")"""
261
- else :
262
- expected += """print(f'!######{{test_stdout_tag}}######!')"""
263
- expected += """
253
+ print(f'!######{{test_stdout_tag}}######!')
264
254
pickled_return_value = pickle.dumps(exception) if exception else pickle.dumps(return_value)
265
255
codeflash_cur.execute('INSERT INTO test_results VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', (test_module_name, test_class_name, test_name, function_name, loop_index, invocation_id, codeflash_duration, pickled_return_value, 'function_call'))
266
256
codeflash_con.commit()
0 commit comments