@@ -488,7 +488,7 @@ def determine_best_candidate(
488488 candidate = candidate ,
489489 helper_functions = code_context .helper_functions ,
490490 runtime = best_test_runtime ,
491- winning_behavioral_test_results = candidate_result .behavior_test_results ,
491+ winning_behavior_test_results = candidate_result .behavior_test_results ,
492492 replay_performance_gain = replay_perf_gain if self .args .benchmark else None ,
493493 winning_benchmarking_test_results = candidate_result .benchmarking_test_results ,
494494 winning_replay_benchmarking_test_results = candidate_result .benchmarking_test_results ,
@@ -575,7 +575,7 @@ def log_successful_optimization(
575575 "original_runtime" : explanation .original_runtime_ns ,
576576 "winning_test_results" : {
577577 tt .to_name (): v
578- for tt , v in explanation .winning_behavioral_test_results .get_test_pass_fail_report_by_type ().items ()
578+ for tt , v in explanation .winning_behavior_test_results .get_test_pass_fail_report_by_type ().items ()
579579 },
580580 },
581581 )
@@ -898,8 +898,9 @@ def setup_and_establish_baseline(
898898 return Failure (baseline_result .failure ())
899899
900900 original_code_baseline , test_functions_to_remove = baseline_result .unwrap ()
901- if isinstance (original_code_baseline , OriginalCodeBaseline ) and not coverage_critic (
902- original_code_baseline .coverage_results , self .args .test_framework
901+ if isinstance (original_code_baseline , OriginalCodeBaseline ) and (
902+ not coverage_critic (original_code_baseline .coverage_results , self .args .test_framework )
903+ or not quantity_of_tests_critic (original_code_baseline )
903904 ):
904905 if self .args .override_fixtures :
905906 restore_conftest (original_conftest_content )
@@ -971,7 +972,7 @@ def find_and_process_best_optimization(
971972 )
972973 explanation = Explanation (
973974 raw_explanation_message = best_optimization .candidate .explanation ,
974- winning_behavioral_test_results = best_optimization .winning_behavioral_test_results ,
975+ winning_behavior_test_results = best_optimization .winning_behavior_test_results ,
975976 winning_benchmarking_test_results = best_optimization .winning_benchmarking_test_results ,
976977 original_runtime_ns = original_code_baseline .runtime ,
977978 best_runtime_ns = best_optimization .runtime ,
@@ -1203,7 +1204,7 @@ def establish_original_code_baseline(
12031204 return Success (
12041205 (
12051206 OriginalCodeBaseline (
1206- behavioral_test_results = behavioral_results ,
1207+ behavior_test_results = behavioral_results ,
12071208 benchmarking_test_results = benchmarking_results ,
12081209 replay_benchmarking_test_results = replay_benchmarking_test_results
12091210 if self .args .benchmark
@@ -1267,7 +1268,7 @@ def run_optimized_candidate(
12671268 )
12681269 )
12691270 console .rule ()
1270- if compare_test_results (baseline_results .behavioral_test_results , candidate_behavior_results ):
1271+ if compare_test_results (baseline_results .behavior_test_results , candidate_behavior_results ):
12711272 logger .info ("Test results matched!" )
12721273 console .rule ()
12731274 else :
0 commit comments