Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions codeflash/benchmarking/replay_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def create_trace_replay_test_code(
if function_name == "__init__":
ret = {class_name_alias}(*args[1:], **kwargs)
else:
instance = args[0] # self
ret = instance{method_name}(*args[1:], **kwargs)
ret = {class_name_alias}{method_name}(*args, **kwargs)
"""
)

Expand Down
6 changes: 2 additions & 4 deletions tests/test_trace_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ def test_code_to_optimize_bubble_sort_codeflash_trace_Sorter_sorter():
if function_name == "__init__":
ret = code_to_optimize_bubble_sort_codeflash_trace_Sorter(*args[1:], **kwargs)
else:
instance = args[0] # self
ret = instance.sorter(*args[1:], **kwargs)
ret = code_to_optimize_bubble_sort_codeflash_trace_Sorter.sorter(*args, **kwargs)

def test_code_to_optimize_bubble_sort_codeflash_trace_Sorter_sort_class():
for args_pkl, kwargs_pkl in get_next_arg_and_return(trace_file=trace_file_path, benchmark_function_name="test_class_sort2", function_name="sort_class", file_path=r"{bubble_sort_path}", class_name="Sorter", num_to_get=100):
Expand All @@ -138,8 +137,7 @@ def test_code_to_optimize_bubble_sort_codeflash_trace_Sorter___init__():
if function_name == "__init__":
ret = code_to_optimize_bubble_sort_codeflash_trace_Sorter(*args[1:], **kwargs)
else:
instance = args[0] # self
ret = instance(*args[1:], **kwargs)
ret = code_to_optimize_bubble_sort_codeflash_trace_Sorter(*args, **kwargs)

"""
assert test_class_sort_path.read_text("utf-8").strip()==test_class_sort_code.strip()
Expand Down
Loading