Skip to content

Commit 5a8522a

Browse files
gantoineCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 081ebfb commit 5a8522a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

backend/tests/handler/metadata/test_launchbox_handler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -925,11 +925,13 @@ def test_select_prefers_region_match_within_type(self):
925925

926926
def test_select_falls_back_to_first_without_region_info(self):
927927
images = [
928-
self._image("eu.png", "Europe"),
929-
self._image("us.png", "North America"),
928+
self._image("first.png", ""),
929+
self._image("second.png", ""),
930930
]
931-
best = _select_remote_cover(images, ())
932-
assert best is not None and best["FileName"] == "eu.png"
931+
# With preferred regions present but no usable Region data on images,
932+
# selection should fall back to the first image (preserves prior behavior).
933+
best = _select_remote_cover(images, ("us",))
934+
assert best is not None and best["FileName"] == "first.png"
933935

934936
def test_select_type_priority_beats_region(self):
935937
images = [

0 commit comments

Comments
 (0)