@@ -187,27 +187,19 @@ def test_chat(vllm_runner, max_model_len: int, model: str, dtype: str,
187187 name_1 = "output" )
188188
189189
190- @pytest .fixture
191- def prompt (request , local_asset_server ) -> TextPrompt :
192- names = request .param
193- urls = [local_asset_server .url_for (n ) for n in names ]
194- return _create_engine_inputs_hf (urls )
195-
196-
197190@pytest .mark .parametrize (
198- "prompt,expected_ranges" ,
199- [
200- pytest .param (IMG_URLS [:1 ], [PlaceholderRange (offset = 11 , length = 494 )]),
201- pytest .param (IMG_URLS [1 :4 ], [
202- PlaceholderRange (offset = 11 , length = 266 ),
203- PlaceholderRange (offset = 277 , length = 1056 ),
204- PlaceholderRange (offset = 1333 , length = 418 )
205- ])
206- ],
207- )
208- def test_multi_modal_placeholders (vllm_runner , prompt : TextPrompt ,
191+ "image_urls,expected_ranges" ,
192+ [(IMG_URLS [:1 ], [PlaceholderRange (offset = 11 , length = 494 )]),
193+ (IMG_URLS [1 :4 ], [
194+ PlaceholderRange (offset = 11 , length = 266 ),
195+ PlaceholderRange (offset = 277 , length = 1056 ),
196+ PlaceholderRange (offset = 1333 , length = 418 )
197+ ])])
198+ def test_multi_modal_placeholders (vllm_runner , image_urls : list [str ],
209199 expected_ranges : list [PlaceholderRange ],
210- monkeypatch ) -> None :
200+ local_asset_server , monkeypatch ) -> None :
201+ local_image_urls = [local_asset_server .url_for (u ) for u in image_urls ]
202+ prompt = _create_engine_inputs_hf (local_image_urls )
211203
212204 # This placeholder checking test only works with V0 engine
213205 # where `multi_modal_placeholders` is returned with `RequestOutput`
0 commit comments