@@ -70,13 +70,13 @@ async def test_nowait_acquisition(self):
7070 @pytest .mark .parametrize ('max_running' , [0 , - 1 , - 5 ])
7171 async def test_invalid_max_running (self , max_running : int ):
7272 """Test that invalid concurrency limits are rejected before creating the limiter."""
73- with pytest .raises (UserError , match = f'max_running must be a positive integer , got { max_running } ' ):
73+ with pytest .raises (UserError , match = f'max_running must be >= 1 , got { max_running } ' ):
7474 ConcurrencyLimiter (max_running = max_running )
7575
7676 @pytest .mark .parametrize ('max_running' , [0 , - 1 , - 5 ])
7777 async def test_invalid_concurrency_limit_config (self , max_running : int ):
7878 """Test that invalid concurrency limit config values fail eagerly."""
79- with pytest .raises (UserError , match = f'max_running must be a positive integer , got { max_running } ' ):
79+ with pytest .raises (UserError , match = f'max_running must be >= 1 , got { max_running } ' ):
8080 ConcurrencyLimit (max_running = max_running )
8181
8282 async def test_waiting_count_tracking (self ):
@@ -208,12 +208,12 @@ async def test_from_limiter_config(self):
208208
209209 async def test_from_invalid_limit (self ):
210210 """Test that invalid normalized concurrency limits fail eagerly."""
211- with pytest .raises (UserError , match = 'max_running must be a positive integer , got 0' ):
211+ with pytest .raises (UserError , match = 'max_running must be >= 1 , got 0' ):
212212 ConcurrencyLimiter .from_limit (0 )
213213
214214 async def test_normalize_to_limiter_rejects_invalid_limit (self ):
215215 """Test that invalid normalized concurrency limits fail before use."""
216- with pytest .raises (UserError , match = 'max_running must be a positive integer , got 0' ):
216+ with pytest .raises (UserError , match = 'max_running must be >= 1 , got 0' ):
217217 normalize_to_limiter (0 )
218218
219219 async def test_none_still_means_no_limit (self ):
@@ -335,8 +335,8 @@ async def test_agent_with_limiter_concurrency(self):
335335
336336 @pytest .mark .parametrize ('max_running' , [0 , - 1 ])
337337 async def test_agent_invalid_int_concurrency_limit (self , max_running : int ):
338- """Test that invalid agent concurrency limits fail before a run can hang ."""
339- with pytest .raises (UserError , match = f'max_running must be a positive integer , got { max_running } ' ):
338+ """Test that invalid agent concurrency limits fail eagerly at construction ."""
339+ with pytest .raises (UserError , match = f'max_running must be >= 1 , got { max_running } ' ):
340340 Agent (TestModel (), max_concurrency = max_running )
341341
342342
0 commit comments