@@ -480,7 +480,7 @@ def test_speedup_critic_with_async_throughput() -> None:
480480 disable_gh_action_noise = True
481481 )
482482
483- # Test case 2: Runtime improves but throughput doesn't meet threshold
483+ # Test case 2: Runtime improves significantly, throughput doesn't meet threshold (should pass)
484484 candidate_result = OptimizedCandidateResult (
485485 max_loop_count = 5 ,
486486 best_test_runtime = 8000 , # 20% runtime improvement
@@ -491,7 +491,7 @@ def test_speedup_critic_with_async_throughput() -> None:
491491 async_throughput = 105 , # Only 5% throughput improvement (below 10% threshold)
492492 )
493493
494- assert not speedup_critic (
494+ assert speedup_critic (
495495 candidate_result = candidate_result ,
496496 original_code_runtime = original_code_runtime ,
497497 best_runtime_until_now = None ,
@@ -500,7 +500,7 @@ def test_speedup_critic_with_async_throughput() -> None:
500500 disable_gh_action_noise = True
501501 )
502502
503- # Test case 3: Throughput improves but runtime doesn't meet threshold
503+ # Test case 3: Throughput improves significantly, runtime doesn't meet threshold (should pass)
504504 candidate_result = OptimizedCandidateResult (
505505 max_loop_count = 5 ,
506506 best_test_runtime = 9800 , # Only 2% runtime improvement (below 5% threshold)
@@ -511,7 +511,7 @@ def test_speedup_critic_with_async_throughput() -> None:
511511 async_throughput = 120 , # 20% throughput improvement
512512 )
513513
514- assert not speedup_critic (
514+ assert speedup_critic (
515515 candidate_result = candidate_result ,
516516 original_code_runtime = original_code_runtime ,
517517 best_runtime_until_now = None ,
@@ -565,7 +565,7 @@ def test_speedup_critic_with_async_throughput() -> None:
565565 assert not speedup_critic (
566566 candidate_result = candidate_result ,
567567 original_code_runtime = original_code_runtime ,
568- best_runtime_until_now = None ,
568+ best_runtime_until_now = 7000 , # Better runtime already exists
569569 original_async_throughput = original_async_throughput ,
570570 best_throughput_until_now = 120 , # Better throughput already exists
571571 disable_gh_action_noise = True
0 commit comments