@@ -203,6 +203,44 @@ def test_zero_padding(self) -> None:
203203 assert "L11: line10" in result
204204
205205
206+ # ---------------------------------------------------------------------------
207+ # LLMAnalyzerBase.get_batches
208+ # ---------------------------------------------------------------------------
209+
210+
211+ class TestLLMAnalyzerBaseGetBatches :
212+ MODEL = "nvidia/openai/gpt-oss-120b"
213+
214+ @pytest .mark .parametrize (
215+ "path" ,
216+ [
217+ "assets/demo.gif" ,
218+ "assets/screenshot.PNG" ,
219+ "assets/tutorial.mp4" ,
220+ "assets/voice.mp3" ,
221+ "assets/photo.webp" ,
222+ "assets/movie.mkv" ,
223+ ],
224+ )
225+ @patch (MOCK_PATCH_TARGET , _mock_get_chat_model )
226+ def test_media_files_are_skipped (self , path : str ) -> None :
227+ analyzer = LLMAnalyzerBase (base_prompt = "test" , model = self .MODEL )
228+
229+ assert analyzer .get_batches ([path ], {path : "decoded media data" }) == []
230+
231+ @patch (MOCK_PATCH_TARGET , _mock_get_chat_model )
232+ def test_text_files_and_svg_are_preserved (self ) -> None :
233+ analyzer = LLMAnalyzerBase (base_prompt = "test" , model = self .MODEL )
234+ file_cache = {
235+ "src/main.py" : "print('hello')\n " ,
236+ "assets/icon.svg" : '<svg><script>alert("x")</script></svg>' ,
237+ }
238+
239+ batches = analyzer .get_batches (list (file_cache ), file_cache )
240+
241+ assert {batch .file_path for batch in batches } == set (file_cache )
242+
243+
206244# ---------------------------------------------------------------------------
207245# LLMAnalyzerBase.build_prompt (default implementation)
208246# ---------------------------------------------------------------------------
0 commit comments