1414class TestLibraryAPIIntegration :
1515 """Test OpenEvolve library API with real LLM integration"""
1616
17- @pytest .mark .asyncio
18- async def test_evolve_function_real_integration (
17+ def test_evolve_function_real_integration (
1918 self ,
2019 optillm_server ,
2120 temp_workspace
@@ -44,7 +43,7 @@ def simple_multiply(x, y):
4443 result = evolve_function (
4544 simple_multiply ,
4645 test_cases ,
47- iterations = 3 , # Small number for fast testing
46+ iterations = 2 , # Very small number for CI speed
4847 output_dir = str (temp_workspace / "evolve_function_output" ),
4948 cleanup = False # Keep files for inspection
5049 )
@@ -71,8 +70,7 @@ def simple_multiply(x, y):
7170 print (f" Output dir: { result .output_dir } " )
7271 print (f" Code length: { len (result .best_code )} chars" )
7372
74- @pytest .mark .asyncio
75- async def test_evolve_code_real_integration (
73+ def test_evolve_code_real_integration (
7674 self ,
7775 optillm_server ,
7876 temp_workspace
@@ -136,8 +134,9 @@ def fibonacci_evaluator(program_path):
136134 result = evolve_code (
137135 initial_code ,
138136 fibonacci_evaluator ,
139- iterations = 2 , # Small number for fast testing
140- output_dir = str (temp_workspace / "evolve_code_output" )
137+ iterations = 1 , # Minimal for CI speed
138+ output_dir = str (temp_workspace / "evolve_code_output" ),
139+ cleanup = False # Keep output directory
141140 )
142141
143142 # Verify result structure
@@ -155,8 +154,7 @@ def fibonacci_evaluator(program_path):
155154 print (f" Best score: { result .best_score } " )
156155 print (f" Output dir: { result .output_dir } " )
157156
158- @pytest .mark .asyncio
159- async def test_run_evolution_real_integration (
157+ def test_run_evolution_real_integration (
160158 self ,
161159 optillm_server ,
162160 temp_workspace
@@ -233,8 +231,9 @@ def evaluate(program_path):
233231 result = run_evolution (
234232 initial_program = str (initial_program ),
235233 evaluator = str (evaluator_file ),
236- iterations = 2 ,
237- output_dir = str (temp_workspace / "run_evolution_output" )
234+ iterations = 1 , # Minimal for CI speed
235+ output_dir = str (temp_workspace / "run_evolution_output" ),
236+ cleanup = False # Keep output directory
238237 )
239238
240239 # Verify result
0 commit comments