@@ -194,7 +194,6 @@ def test_sort(self):
194194 [CodePosition (9 , 17 ), CodePosition (13 , 17 ), CodePosition (17 , 17 )],
195195 func ,
196196 Path (f .name ).parent ,
197- "unittest" ,
198197 )
199198 os .chdir (original_cwd )
200199 assert success
@@ -293,7 +292,7 @@ def test_prepare_image_for_yolo():
293292 run_cwd = Path (__file__ ).parent .parent .resolve ()
294293 os .chdir (run_cwd )
295294 success , new_test = inject_profiling_into_existing_test (
296- Path (f .name ), [CodePosition (10 , 14 )], func , Path (f .name ).parent , "pytest"
295+ Path (f .name ), [CodePosition (10 , 14 )], func , Path (f .name ).parent
297296 )
298297 os .chdir (original_cwd )
299298 assert success
@@ -402,7 +401,6 @@ def test_sort():
402401 [CodePosition (8 , 14 ), CodePosition (12 , 14 )],
403402 func ,
404403 project_root_path ,
405- "pytest" ,
406404 mode = TestingMode .BEHAVIOR ,
407405 )
408406 os .chdir (original_cwd )
@@ -418,7 +416,6 @@ def test_sort():
418416 [CodePosition (8 , 14 ), CodePosition (12 , 14 )],
419417 func ,
420418 project_root_path ,
421- "pytest" ,
422419 mode = TestingMode .PERFORMANCE ,
423420 )
424421 assert success
@@ -656,11 +653,11 @@ def test_sort_parametrized(input, expected_output):
656653 func = FunctionToOptimize (function_name = "sorter" , parents = [], file_path = code_path )
657654 os .chdir (run_cwd )
658655 success , new_test = inject_profiling_into_existing_test (
659- test_path , [CodePosition (14 , 13 )], func , project_root_path , "pytest" , mode = TestingMode .BEHAVIOR
656+ test_path , [CodePosition (14 , 13 )], func , project_root_path , mode = TestingMode .BEHAVIOR
660657 )
661658 assert success
662659 success , new_test_perf = inject_profiling_into_existing_test (
663- test_path , [CodePosition (14 , 13 )], func , project_root_path , "pytest" , mode = TestingMode .PERFORMANCE
660+ test_path , [CodePosition (14 , 13 )], func , project_root_path , mode = TestingMode .PERFORMANCE
664661 )
665662
666663 os .chdir (original_cwd )
@@ -933,11 +930,11 @@ def test_sort_parametrized_loop(input, expected_output):
933930 func = FunctionToOptimize (function_name = "sorter" , parents = [], file_path = code_path )
934931 os .chdir (run_cwd )
935932 success , new_test = inject_profiling_into_existing_test (
936- test_path , [CodePosition (15 , 17 )], func , project_root_path , "pytest" , mode = TestingMode .BEHAVIOR
933+ test_path , [CodePosition (15 , 17 )], func , project_root_path , mode = TestingMode .BEHAVIOR
937934 )
938935 assert success
939936 success , new_test_perf = inject_profiling_into_existing_test (
940- test_path , [CodePosition (15 , 17 )], func , project_root_path , "pytest" , mode = TestingMode .PERFORMANCE
937+ test_path , [CodePosition (15 , 17 )], func , project_root_path , mode = TestingMode .PERFORMANCE
941938 )
942939
943940 os .chdir (original_cwd )
@@ -1293,11 +1290,11 @@ def test_sort():
12931290 func = FunctionToOptimize (function_name = "sorter" , parents = [], file_path = code_path )
12941291 os .chdir (str (run_cwd ))
12951292 success , new_test_behavior = inject_profiling_into_existing_test (
1296- test_path , [CodePosition (11 , 17 )], func , project_root_path , "pytest" , mode = TestingMode .BEHAVIOR
1293+ test_path , [CodePosition (11 , 17 )], func , project_root_path , mode = TestingMode .BEHAVIOR
12971294 )
12981295 assert success
12991296 success , new_test_perf = inject_profiling_into_existing_test (
1300- test_path , [CodePosition (11 , 17 )], func , project_root_path , "pytest" , mode = TestingMode .PERFORMANCE
1297+ test_path , [CodePosition (11 , 17 )], func , project_root_path , mode = TestingMode .PERFORMANCE
13011298 )
13021299 os .chdir (original_cwd )
13031300 assert success
@@ -1672,7 +1669,6 @@ def test_sort(self):
16721669 [CodePosition (9 , 17 ), CodePosition (13 , 17 ), CodePosition (17 , 17 )],
16731670 func ,
16741671 project_root_path ,
1675- "unittest" ,
16761672 mode = TestingMode .BEHAVIOR ,
16771673 )
16781674 assert success
@@ -1681,7 +1677,6 @@ def test_sort(self):
16811677 [CodePosition (9 , 17 ), CodePosition (13 , 17 ), CodePosition (17 , 17 )],
16821678 func ,
16831679 project_root_path ,
1684- "unittest" ,
16851680 mode = TestingMode .PERFORMANCE ,
16861681 )
16871682 os .chdir (original_cwd )
@@ -1926,11 +1921,11 @@ def test_sort(self, input, expected_output):
19261921 func = FunctionToOptimize (function_name = "sorter" , parents = [], file_path = code_path )
19271922 os .chdir (run_cwd )
19281923 success , new_test_behavior = inject_profiling_into_existing_test (
1929- test_path , [CodePosition (16 , 17 )], func , project_root_path , "unittest" , mode = TestingMode .BEHAVIOR
1924+ test_path , [CodePosition (16 , 17 )], func , project_root_path , mode = TestingMode .BEHAVIOR
19301925 )
19311926 assert success
19321927 success , new_test_perf = inject_profiling_into_existing_test (
1933- test_path , [CodePosition (16 , 17 )], func , project_root_path , "unittest" , mode = TestingMode .PERFORMANCE
1928+ test_path , [CodePosition (16 , 17 )], func , project_root_path , mode = TestingMode .PERFORMANCE
19341929 )
19351930
19361931 os .chdir (original_cwd )
@@ -2186,11 +2181,11 @@ def test_sort(self):
21862181 func = FunctionToOptimize (function_name = "sorter" , parents = [], file_path = code_path )
21872182 os .chdir (run_cwd )
21882183 success , new_test_behavior = inject_profiling_into_existing_test (
2189- test_path , [CodePosition (14 , 21 )], func , project_root_path , "unittest" , mode = TestingMode .BEHAVIOR
2184+ test_path , [CodePosition (14 , 21 )], func , project_root_path , mode = TestingMode .BEHAVIOR
21902185 )
21912186 assert success
21922187 success , new_test_perf = inject_profiling_into_existing_test (
2193- test_path , [CodePosition (14 , 21 )], func , project_root_path , "unittest" , mode = TestingMode .PERFORMANCE
2188+ test_path , [CodePosition (14 , 21 )], func , project_root_path , mode = TestingMode .PERFORMANCE
21942189 )
21952190 os .chdir (original_cwd )
21962191 assert success
@@ -2437,10 +2432,10 @@ def test_sort(self, input, expected_output):
24372432 f = FunctionToOptimize (function_name = "sorter" , file_path = code_path , parents = [])
24382433 os .chdir (run_cwd )
24392434 success , new_test_behavior = inject_profiling_into_existing_test (
2440- test_path , [CodePosition (17 , 21 )], f , project_root_path , "unittest" , mode = TestingMode .BEHAVIOR
2435+ test_path , [CodePosition (17 , 21 )], f , project_root_path , mode = TestingMode .BEHAVIOR
24412436 )
24422437 success , new_test_perf = inject_profiling_into_existing_test (
2443- test_path , [CodePosition (17 , 21 )], f , project_root_path , "unittest" , mode = TestingMode .PERFORMANCE
2438+ test_path , [CodePosition (17 , 21 )], f , project_root_path , mode = TestingMode .PERFORMANCE
24442439 )
24452440 os .chdir (original_cwd )
24462441 assert success
@@ -2743,7 +2738,7 @@ def test_class_name_A_function_name():
27432738 )
27442739 os .chdir (str (run_cwd ))
27452740 success , new_test = inject_profiling_into_existing_test (
2746- test_path , [CodePosition (4 , 23 )], func , project_root_path , "pytest"
2741+ test_path , [CodePosition (4 , 23 )], func , project_root_path
27472742 )
27482743 os .chdir (original_cwd )
27492744 finally :
@@ -2820,7 +2815,7 @@ def test_common_tags_1():
28202815
28212816 os .chdir (str (run_cwd ))
28222817 success , new_test = inject_profiling_into_existing_test (
2823- test_path , [CodePosition (7 , 11 ), CodePosition (11 , 11 )], func , project_root_path , "pytest"
2818+ test_path , [CodePosition (7 , 11 ), CodePosition (11 , 11 )], func , project_root_path
28242819 )
28252820 os .chdir (original_cwd )
28262821 assert success
@@ -2886,7 +2881,7 @@ def test_sort():
28862881
28872882 os .chdir (str (run_cwd ))
28882883 success , new_test = inject_profiling_into_existing_test (
2889- test_path , [CodePosition (7 , 15 )], func , project_root_path , "pytest"
2884+ test_path , [CodePosition (7 , 15 )], func , project_root_path
28902885 )
28912886 os .chdir (original_cwd )
28922887 assert success
@@ -2969,7 +2964,7 @@ def test_sort():
29692964
29702965 os .chdir (run_cwd )
29712966 success , new_test = inject_profiling_into_existing_test (
2972- test_path , [CodePosition (6 , 26 ), CodePosition (10 , 26 )], function_to_optimize , project_root_path , "pytest"
2967+ test_path , [CodePosition (6 , 26 ), CodePosition (10 , 26 )], function_to_optimize , project_root_path
29732968 )
29742969 os .chdir (original_cwd )
29752970 assert success
@@ -3070,7 +3065,7 @@ def test_code_replacement10() -> None:
30703065 run_cwd = Path (__file__ ).parent .parent .resolve ()
30713066 os .chdir (run_cwd )
30723067 success , new_test = inject_profiling_into_existing_test (
3073- test_file_path , [CodePosition (22 , 28 ), CodePosition (28 , 28 )], func , test_file_path .parent , "pytest"
3068+ test_file_path , [CodePosition (22 , 28 ), CodePosition (28 , 28 )], func , test_file_path .parent
30743069 )
30753070 os .chdir (original_cwd )
30763071 assert success
@@ -3128,7 +3123,7 @@ def test_sleepfunc_sequence_short(n, expected_total_sleep_time):
31283123 func = FunctionToOptimize (function_name = "accurate_sleepfunc" , parents = [], file_path = code_path )
31293124 os .chdir (run_cwd )
31303125 success , new_test = inject_profiling_into_existing_test (
3131- test_path , [CodePosition (8 , 13 )], func , project_root_path , "pytest" , mode = TestingMode .PERFORMANCE
3126+ test_path , [CodePosition (8 , 13 )], func , project_root_path , mode = TestingMode .PERFORMANCE
31323127 )
31333128 os .chdir (original_cwd )
31343129
@@ -3245,7 +3240,7 @@ def test_sleepfunc_sequence_short(self, n, expected_total_sleep_time):
32453240 func = FunctionToOptimize (function_name = "accurate_sleepfunc" , parents = [], file_path = code_path )
32463241 os .chdir (run_cwd )
32473242 success , new_test = inject_profiling_into_existing_test (
3248- test_path , [CodePosition (12 , 17 )], func , project_root_path , "unittest" , mode = TestingMode .PERFORMANCE
3243+ test_path , [CodePosition (12 , 17 )], func , project_root_path , mode = TestingMode .PERFORMANCE
32493244 )
32503245 os .chdir (original_cwd )
32513246
0 commit comments