File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ class CodeString(BaseModel):
163163
164164
165165def get_code_block_splitter (file_path : Path ) -> str :
166- return f"# file: { file_path } "
166+ return f"# file: { file_path . as_posix () } "
167167
168168
169169markdown_pattern = re .compile (r"```python:([^\n]+)\n(.*?)\n```" , re .DOTALL )
Original file line number Diff line number Diff line change 66
77from codeflash .discovery .functions_to_optimize import FunctionToOptimize
88from codeflash .either import is_successful
9- from codeflash .models .models import FunctionParent
9+ from codeflash .models .models import FunctionParent , get_code_block_splitter
1010from codeflash .optimization .function_optimizer import FunctionOptimizer
1111from codeflash .optimization .optimizer import Optimizer
1212from codeflash .verification .verification_utils import TestConfig
@@ -413,17 +413,17 @@ def test_bubble_sort_deps() -> None:
413413 code_context = ctx_result .unwrap ()
414414 assert (
415415 code_context .testgen_context .flat
416- == f"""# file: code_to_optimize/bubble_sort_dep1_helper.py
416+ == f"""{ get_code_block_splitter ( Path ( " code_to_optimize/bubble_sort_dep1_helper.py" )) }
417417def dep1_comparer(arr, j: int) -> bool:
418418 return arr[j] > arr[j + 1]
419419
420- # file: code_to_optimize/bubble_sort_dep2_swap.py
420+ { get_code_block_splitter ( Path ( " code_to_optimize/bubble_sort_dep2_swap.py" )) }
421421def dep2_swap(arr, j):
422422 temp = arr[j]
423423 arr[j] = arr[j + 1]
424424 arr[j + 1] = temp
425425
426- # file: code_to_optimize/bubble_sort_deps.py
426+ { get_code_block_splitter ( Path ( " code_to_optimize/bubble_sort_deps.py" )) }
427427from code_to_optimize.bubble_sort_dep1_helper import dep1_comparer
428428from code_to_optimize.bubble_sort_dep2_swap import dep2_swap
429429
You can’t perform that action at this time.
0 commit comments