Skip to content

Commit 30259c0

Browse files
committed
improve runtimecomments
1 parent a09d11c commit 30259c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codeflash/code_utils/edit_generated_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def add_runtime_comments_to_generated_tests(
3737
) -> GeneratedTestsList:
3838
"""Add runtime performance comments to function calls in generated tests."""
3939

40+
# TODO: reduce for loops to one
4041
class RuntimeCommentTransformer(cst.CSTTransformer):
4142
def __init__(self) -> None:
4243
self.in_test_function = False
@@ -80,7 +81,7 @@ def leave_SimpleStatementLine(
8081
# Find matching test cases by looking for this test function name in the test results
8182
matching_original_times = []
8283
matching_optimized_times = []
83-
84+
# TODO : will not work if there are multiple test cases with the same name, match filename + test class + test function name
8485
for invocation_id, runtimes in original_runtimes.items():
8586
if invocation_id.test_function_name == self.current_test_name:
8687
matching_original_times.extend(runtimes)

0 commit comments

Comments
 (0)