From 51ceda791cacf992befa11bca8145f3f39827e06 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Mon, 22 Sep 2025 20:11:18 -0700 Subject: [PATCH 1/3] Update test_runner.py --- codeflash/verification/test_runner.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/codeflash/verification/test_runner.py b/codeflash/verification/test_runner.py index a0ad8fd66..ca9a9a33e 100644 --- a/codeflash/verification/test_runner.py +++ b/codeflash/verification/test_runner.py @@ -8,7 +8,7 @@ from codeflash.cli_cmds.console import logger from codeflash.code_utils.code_utils import custom_addopts, get_run_tmp_file from codeflash.code_utils.compat import IS_POSIX, SAFE_SYS_EXECUTABLE -from codeflash.code_utils.config_consts import get_total_looping_time +from codeflash.code_utils.config_consts import TOTAL_LOOPING_TIME_EFFECTIVE from codeflash.code_utils.coverage_utils import prepare_coverage_files from codeflash.models.models import TestFiles, TestType @@ -37,7 +37,6 @@ def run_behavioral_tests( pytest_timeout: int | None = None, pytest_cmd: str = "pytest", verbose: bool = False, - pytest_target_runtime_seconds: int = get_total_looping_time(), enable_coverage: bool = False, ) -> tuple[Path, subprocess.CompletedProcess, Path | None, Path | None]: if test_framework == "pytest": @@ -66,7 +65,6 @@ def run_behavioral_tests( "--codeflash_loops_scope=session", "--codeflash_min_loops=1", "--codeflash_max_loops=1", - f"--codeflash_seconds={pytest_target_runtime_seconds}", # TODO : This is unnecessary, update the plugin to not ask for this ] result_file_path = get_run_tmp_file(Path("pytest_results.xml")) @@ -151,7 +149,6 @@ def run_line_profile_tests( cwd: Path, test_framework: str, *, - pytest_target_runtime_seconds: float = get_total_looping_time(), verbose: bool = False, pytest_timeout: int | None = None, pytest_min_loops: int = 5, # noqa: ARG001 @@ -186,7 +183,6 @@ def run_line_profile_tests( "--codeflash_loops_scope=session", "--codeflash_min_loops=1", "--codeflash_max_loops=1", - f"--codeflash_seconds={pytest_target_runtime_seconds}", ] result_file_path = get_run_tmp_file(Path("pytest_results.xml")) result_args = [f"--junitxml={result_file_path.as_posix()}", "-o", "junit_logging=all"] @@ -237,7 +233,7 @@ def run_benchmarking_tests( cwd: Path, test_framework: str, *, - pytest_target_runtime_seconds: float = get_total_looping_time(), + pytest_target_runtime_seconds: float = TOTAL_LOOPING_TIME_EFFECTIVE, verbose: bool = False, pytest_timeout: int | None = None, pytest_min_loops: int = 5, From 5a425c3c46ac5137d576c208b87ab9f9511d2ff9 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Mon, 22 Sep 2025 20:22:18 -0700 Subject: [PATCH 2/3] Update test_runner.py --- codeflash/verification/test_runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codeflash/verification/test_runner.py b/codeflash/verification/test_runner.py index ca9a9a33e..e850e1e83 100644 --- a/codeflash/verification/test_runner.py +++ b/codeflash/verification/test_runner.py @@ -37,6 +37,7 @@ def run_behavioral_tests( pytest_timeout: int | None = None, pytest_cmd: str = "pytest", verbose: bool = False, + pytest_target_runtime_seconds: int = TOTAL_LOOPING_TIME_EFFECTIVE, enable_coverage: bool = False, ) -> tuple[Path, subprocess.CompletedProcess, Path | None, Path | None]: if test_framework == "pytest": @@ -65,6 +66,7 @@ def run_behavioral_tests( "--codeflash_loops_scope=session", "--codeflash_min_loops=1", "--codeflash_max_loops=1", + f"--codeflash_seconds={pytest_target_runtime_seconds}" ] result_file_path = get_run_tmp_file(Path("pytest_results.xml")) @@ -149,6 +151,7 @@ def run_line_profile_tests( cwd: Path, test_framework: str, *, + pytest_target_runtime_seconds: float = TOTAL_LOOPING_TIME_EFFECTIVE, verbose: bool = False, pytest_timeout: int | None = None, pytest_min_loops: int = 5, # noqa: ARG001 @@ -183,6 +186,7 @@ def run_line_profile_tests( "--codeflash_loops_scope=session", "--codeflash_min_loops=1", "--codeflash_max_loops=1", + f"--codeflash_seconds={pytest_target_runtime_seconds}", ] result_file_path = get_run_tmp_file(Path("pytest_results.xml")) result_args = [f"--junitxml={result_file_path.as_posix()}", "-o", "junit_logging=all"] From 4c8b76f8d8e50b11dde2bccd8092d94553789441 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Mon, 22 Sep 2025 20:24:19 -0700 Subject: [PATCH 3/3] Update test_runner.py --- codeflash/verification/test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codeflash/verification/test_runner.py b/codeflash/verification/test_runner.py index e850e1e83..5c839b8fb 100644 --- a/codeflash/verification/test_runner.py +++ b/codeflash/verification/test_runner.py @@ -66,7 +66,7 @@ def run_behavioral_tests( "--codeflash_loops_scope=session", "--codeflash_min_loops=1", "--codeflash_max_loops=1", - f"--codeflash_seconds={pytest_target_runtime_seconds}" + f"--codeflash_seconds={pytest_target_runtime_seconds}", ] result_file_path = get_run_tmp_file(Path("pytest_results.xml"))