Skip to content

Commit c0bd121

Browse files
Merge pull request #443 from codeflash-ai/fix-replay-test-threshold
minor modification for checking replay tests passing
2 parents 601e03b + 82b6936 commit c0bd121

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/result/critic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def quantity_of_tests_critic(candidate_result: OptimizedCandidateResult) -> bool
5656

5757
if pass_count >= MIN_TESTCASE_PASSED_THRESHOLD:
5858
return True
59-
# If only one test passed, check if it's a REPLAY_TEST
60-
return bool(pass_count == 1 and report[TestType.REPLAY_TEST]["passed"] == 1)
59+
# If one or more tests passed, check if least one of them was a successful REPLAY_TEST
60+
return bool(pass_count >= 1 and report[TestType.REPLAY_TEST]["passed"] >= 1)
6161

6262

6363
def coverage_critic(original_code_coverage: CoverageData | None, test_framework: str) -> bool:

0 commit comments

Comments
 (0)