@@ -21,7 +21,6 @@ class TestConfig:
2121 # Make file_path optional when trace_mode is True
2222 file_path : Optional [pathlib .Path ] = None
2323 function_name : Optional [str ] = None
24- test_framework : Optional [str ] = None
2524 expected_unit_tests : Optional [int ] = None
2625 min_improvement_x : float = 0.1
2726 trace_mode : bool = False
@@ -86,7 +85,7 @@ def run_codeflash_command(
8685
8786 path_to_file = cwd / config .file_path
8887 file_contents = path_to_file .read_text ("utf-8" )
89- test_root = cwd / "tests" / ( config . test_framework or "" )
88+ test_root = cwd / "tests" / "pytest" # Always use pytest
9089
9190 command = build_command (cwd , config , test_root , config .benchmarks_root if config .benchmarks_root else None )
9291 env = os .environ .copy ()
@@ -129,10 +128,8 @@ def build_command(
129128
130129 if config .function_name :
131130 base_command .extend (["--function" , config .function_name ])
132- if config .test_framework :
133- base_command .extend (
134- ["--test-framework" , config .test_framework , "--tests-root" , str (test_root ), "--module-root" , str (cwd )]
135- )
131+ # Always use pytest - test framework is specified via tests-root and module-root
132+ base_command .extend (["--tests-root" , str (test_root ), "--module-root" , str (cwd )])
136133 if benchmarks_root :
137134 base_command .extend (["--benchmark" , "--benchmarks-root" , str (benchmarks_root )])
138135 if config .use_worktree :
@@ -190,7 +187,7 @@ def validate_stdout_in_candidate(stdout: str, expected_in_stdout: list[str]) ->
190187
191188
192189def run_trace_test (cwd : pathlib .Path , config : TestConfig , expected_improvement_pct : int ) -> bool :
193- test_root = cwd / "tests" / ( config . test_framework or "" )
190+ test_root = cwd / "tests" / "pytest" # Always use pytest
194191 clear_directory (test_root )
195192 command = ["uv" , "run" , "--no-project" , "-m" , "codeflash.main" , "optimize" , "workload.py" ]
196193 env = os .environ .copy ()
0 commit comments