22from codeflash .verification .parse_test_output import merge_test_results
33
44
5- def generate_test_invocations (count = 100 ):
5+ def generate_test_invocations (count : int = 100 ) -> tuple [ TestResults , TestResults ] :
66 """Generate a set number of test invocations for benchmarking."""
77 test_results_xml = TestResults ()
88 test_results_bin = TestResults ()
@@ -21,7 +21,7 @@ def generate_test_invocations(count=100):
2121 function_getting_tested = "sorter" ,
2222 iteration_id = iteration_id ,
2323 ),
24- file_name = "/tmp/tests/unittest/test_bubble_sort__perfinstrumented.py" ,
24+ file_name = "/tmp/tests/unittest/test_bubble_sort__perfinstrumented.py" , # noqa: S108
2525 did_pass = True ,
2626 runtime = None if i % 3 == 0 else i * 100 , # Vary runtime values
2727 test_framework = "unittest" ,
@@ -42,7 +42,7 @@ def generate_test_invocations(count=100):
4242 function_getting_tested = "sorter" ,
4343 iteration_id = iteration_id ,
4444 ),
45- file_name = "/tmp/tests/unittest/test_bubble_sort__perfinstrumented.py" ,
45+ file_name = "/tmp/tests/unittest/test_bubble_sort__perfinstrumented.py" , # noqa: S108
4646 did_pass = True ,
4747 runtime = 500 + i * 20 , # Generate varying runtime values
4848 test_framework = "unittest" ,
@@ -56,12 +56,12 @@ def generate_test_invocations(count=100):
5656 return test_results_xml , test_results_bin
5757
5858
59- def run_merge_benchmark (count = 100 ):
59+ def run_merge_benchmark (count : int = 100 ) -> None :
6060 test_results_xml , test_results_bin = generate_test_invocations (count )
6161
6262 # Perform the merge operation that will be benchmarked
6363 merge_test_results (xml_test_results = test_results_xml , bin_test_results = test_results_bin , test_framework = "unittest" )
6464
6565
66- def test_benchmark_merge_test_results (benchmark ):
66+ def test_benchmark_merge_test_results (benchmark ) -> None :
6767 benchmark (run_merge_benchmark , 1000 ) # Default to 100 test invocations
0 commit comments