Skip to content

Commit 4bd9e25

Browse files
Merge pull request #697 from codeflash-ai/codeflash/optimize-pr695-2025-08-29T14.42.12
⚡️ Speed up function `behavioral_test_failure_error` by 107% in PR #695 (`enhancement/codeflash-errors`)
2 parents 239d938 + baa6e1b commit 4bd9e25

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

codeflash/errors/errors.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
from codeflash.code_utils.compat import LF
44
from codeflash.either import CodeflashError
55

6+
_BEHAVIORAL_TEST_FAILURE_ERROR = CodeflashError(
7+
"BEHAVIORAL_TEST_FAILURE_ERROR", "Failed to establish a baseline for the original code - bevhavioral tests failed."
8+
)
9+
610

711
def shell_rc_permission_error(shell_rc_path: str, api_key_line: str) -> CodeflashError:
812
return CodeflashError(
@@ -74,7 +78,4 @@ def test_confidence_threshold_not_met_error() -> CodeflashError:
7478

7579

7680
def behavioral_test_failure_error() -> CodeflashError:
77-
return CodeflashError(
78-
"BEHAVIORAL_TEST_FAILURE_ERROR",
79-
"Failed to establish a baseline for the original code - behavioral tests failed.",
80-
)
81+
return _BEHAVIORAL_TEST_FAILURE_ERROR

0 commit comments

Comments
 (0)