Optimize multi-ROM exclusion matching pass

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andgantoine authored and GitHub committed 2026-05-21 18:52:55 +00:00
1 parent 5a1e238a5f
commit 98bc9a9eea
2 files changed
+38 -9

No files matched your search

@@ -273,6 +273,19 @@ class TestFSRomsHandler:
result = handler.exclude_multi_roms(roms)
assert result == ["Game1", "Game2"]
def test_exclude_multi_roms_wildcard_patterns(
self, handler: FSRomsHandler, config
):
"""Test exclude_multi_roms keeps wildcard matching with normalized config"""
roms = ["Game1", "Manuals", "manuals-fr", "Game2"]
config.EXCLUDED_MULTI_FILES = [" manuals* "]
with pytest.MonkeyPatch.context() as m:
m.setattr("handler.filesystem.roms_handler.cm.get_config", lambda: config)
result = handler.exclude_multi_roms(roms)
assert result == ["Game1", "Game2"]
def test_build_rom_file_single_file(self, rom_single: Rom, handler: FSRomsHandler):
"""Test _build_rom_file with actual single ROM file"""
rom_path = Path(rom_single.fs_path)