@@ -365,15 +365,15 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
365365 targets = [ast .Name (id = "test_id" , ctx = ast .Store ())],
366366 value = ast .JoinedStr (
367367 values = [
368- ast .FormattedValue (value = ast .Name (id = "test_module_name " , ctx = ast .Load ()), conversion = - 1 ),
368+ ast .FormattedValue (value = ast .Name (id = "codeflash_test_module_name " , ctx = ast .Load ()), conversion = - 1 ),
369369 ast .Constant (value = ":" ),
370- ast .FormattedValue (value = ast .Name (id = "test_class_name " , ctx = ast .Load ()), conversion = - 1 ),
370+ ast .FormattedValue (value = ast .Name (id = "codeflash_test_class_name " , ctx = ast .Load ()), conversion = - 1 ),
371371 ast .Constant (value = ":" ),
372- ast .FormattedValue (value = ast .Name (id = "test_name " , ctx = ast .Load ()), conversion = - 1 ),
372+ ast .FormattedValue (value = ast .Name (id = "codeflash_test_name " , ctx = ast .Load ()), conversion = - 1 ),
373373 ast .Constant (value = ":" ),
374- ast .FormattedValue (value = ast .Name (id = "line_id " , ctx = ast .Load ()), conversion = - 1 ),
374+ ast .FormattedValue (value = ast .Name (id = "codeflash_line_id " , ctx = ast .Load ()), conversion = - 1 ),
375375 ast .Constant (value = ":" ),
376- ast .FormattedValue (value = ast .Name (id = "loop_index " , ctx = ast .Load ()), conversion = - 1 ),
376+ ast .FormattedValue (value = ast .Name (id = "codeflash_loop_index " , ctx = ast .Load ()), conversion = - 1 ),
377377 ]
378378 ),
379379 lineno = lineno + 1 ,
@@ -453,7 +453,7 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
453453 targets = [ast .Name (id = "invocation_id" , ctx = ast .Store ())],
454454 value = ast .JoinedStr (
455455 values = [
456- ast .FormattedValue (value = ast .Name (id = "line_id " , ctx = ast .Load ()), conversion = - 1 ),
456+ ast .FormattedValue (value = ast .Name (id = "codeflash_line_id " , ctx = ast .Load ()), conversion = - 1 ),
457457 ast .Constant (value = "_" ),
458458 ast .FormattedValue (value = ast .Name (id = "codeflash_test_index" , ctx = ast .Load ()), conversion = - 1 ),
459459 ]
@@ -466,25 +466,31 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
466466 targets = [ast .Name (id = "test_stdout_tag" , ctx = ast .Store ())],
467467 value = ast .JoinedStr (
468468 values = [
469- ast .FormattedValue (value = ast .Name (id = "test_module_name" , ctx = ast .Load ()), conversion = - 1 ),
469+ ast .FormattedValue (
470+ value = ast .Name (id = "codeflash_test_module_name" , ctx = ast .Load ()), conversion = - 1
471+ ),
470472 ast .Constant (value = ":" ),
471473 ast .FormattedValue (
472474 value = ast .IfExp (
473- test = ast .Name (id = "test_class_name " , ctx = ast .Load ()),
475+ test = ast .Name (id = "codeflash_test_class_name " , ctx = ast .Load ()),
474476 body = ast .BinOp (
475- left = ast .Name (id = "test_class_name " , ctx = ast .Load ()),
477+ left = ast .Name (id = "codeflash_test_class_name " , ctx = ast .Load ()),
476478 op = ast .Add (),
477479 right = ast .Constant (value = "." ),
478480 ),
479481 orelse = ast .Constant (value = "" ),
480482 ),
481483 conversion = - 1 ,
482484 ),
483- ast .FormattedValue (value = ast .Name (id = "test_name " , ctx = ast .Load ()), conversion = - 1 ),
485+ ast .FormattedValue (value = ast .Name (id = "codeflash_test_name " , ctx = ast .Load ()), conversion = - 1 ),
484486 ast .Constant (value = ":" ),
485- ast .FormattedValue (value = ast .Name (id = "function_name" , ctx = ast .Load ()), conversion = - 1 ),
487+ ast .FormattedValue (
488+ value = ast .Name (id = "codeflash_function_name" , ctx = ast .Load ()), conversion = - 1
489+ ),
486490 ast .Constant (value = ":" ),
487- ast .FormattedValue (value = ast .Name (id = "loop_index" , ctx = ast .Load ()), conversion = - 1 ),
491+ ast .FormattedValue (
492+ value = ast .Name (id = "codeflash_loop_index" , ctx = ast .Load ()), conversion = - 1
493+ ),
488494 ast .Constant (value = ":" ),
489495 ast .FormattedValue (value = ast .Name (id = "invocation_id" , ctx = ast .Load ()), conversion = - 1 ),
490496 ]
@@ -537,7 +543,7 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
537543 ast .Assign (
538544 targets = [ast .Name (id = "return_value" , ctx = ast .Store ())],
539545 value = ast .Call (
540- func = ast .Name (id = "wrapped " , ctx = ast .Load ()),
546+ func = ast .Name (id = "codeflash_wrapped " , ctx = ast .Load ()),
541547 args = [ast .Starred (value = ast .Name (id = "args" , ctx = ast .Load ()), ctx = ast .Load ())],
542548 keywords = [ast .keyword (arg = None , value = ast .Name (id = "kwargs" , ctx = ast .Load ()))],
543549 ),
@@ -664,11 +670,11 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
664670 ast .Constant (value = "INSERT INTO test_results VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" ),
665671 ast .Tuple (
666672 elts = [
667- ast .Name (id = "test_module_name " , ctx = ast .Load ()),
668- ast .Name (id = "test_class_name " , ctx = ast .Load ()),
669- ast .Name (id = "test_name " , ctx = ast .Load ()),
670- ast .Name (id = "function_name " , ctx = ast .Load ()),
671- ast .Name (id = "loop_index " , ctx = ast .Load ()),
673+ ast .Name (id = "codeflash_test_module_name " , ctx = ast .Load ()),
674+ ast .Name (id = "codeflash_test_class_name " , ctx = ast .Load ()),
675+ ast .Name (id = "codeflash_test_name " , ctx = ast .Load ()),
676+ ast .Name (id = "codeflash_function_name " , ctx = ast .Load ()),
677+ ast .Name (id = "codeflash_loop_index " , ctx = ast .Load ()),
672678 ast .Name (id = "invocation_id" , ctx = ast .Load ()),
673679 ast .Name (id = "codeflash_duration" , ctx = ast .Load ()),
674680 ast .Name (id = "pickled_return_value" , ctx = ast .Load ()),
@@ -707,13 +713,13 @@ def create_wrapper_function(mode: TestingMode = TestingMode.BEHAVIOR) -> ast.Fun
707713 name = "codeflash_wrap" ,
708714 args = ast .arguments (
709715 args = [
710- ast .arg (arg = "wrapped " , annotation = None ),
711- ast .arg (arg = "test_module_name " , annotation = None ),
712- ast .arg (arg = "test_class_name " , annotation = None ),
713- ast .arg (arg = "test_name " , annotation = None ),
714- ast .arg (arg = "function_name " , annotation = None ),
715- ast .arg (arg = "line_id " , annotation = None ),
716- ast .arg (arg = "loop_index " , annotation = None ),
716+ ast .arg (arg = "codeflash_wrapped " , annotation = None ),
717+ ast .arg (arg = "codeflash_test_module_name " , annotation = None ),
718+ ast .arg (arg = "codeflash_test_class_name " , annotation = None ),
719+ ast .arg (arg = "codeflash_test_name " , annotation = None ),
720+ ast .arg (arg = "codeflash_function_name " , annotation = None ),
721+ ast .arg (arg = "codeflash_line_id " , annotation = None ),
722+ ast .arg (arg = "codeflash_loop_index " , annotation = None ),
717723 * ([ast .arg (arg = "codeflash_cur" , annotation = None )] if mode == TestingMode .BEHAVIOR else []),
718724 * ([ast .arg (arg = "codeflash_con" , annotation = None )] if mode == TestingMode .BEHAVIOR else []),
719725 ],
0 commit comments