From 82bc875dc67c9dd5e7cea82389620ea6efd87f43 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Thu, 3 Sep 2026 17:59:51 -0400 Subject: [PATCH] test(scan): type the sigil skip cases instead of a kwargs bag The rebase put the branch's keyword-only `existing_files` alongside master's title id flags, and mypy resolves a `**dict[str, bool]` against every parameter, so the bag no longer type checks. Name the two flags the cases actually vary. Co-Authored-By: Claude Opus 5 (1M context) --- .../handler/filesystem/test_roms_handler.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/backend/tests/handler/filesystem/test_roms_handler.py b/backend/tests/handler/filesystem/test_roms_handler.py index 4094e5078..2ad179e40 100644 --- a/backend/tests/handler/filesystem/test_roms_handler.py +++ b/backend/tests/handler/filesystem/test_roms_handler.py @@ -1715,18 +1715,19 @@ class TestSigilTitleIdExtraction: @pytest.mark.asyncio @pytest.mark.parametrize( - ("platform", "fs_name", "kwargs"), + ("platform", "fs_name", "calculate_hashes", "extract_title_ids"), [ # Not a platform sigil covers. ( Platform(name="Nintendo 64", slug="n64", fs_slug="n64"), "Game.z64", - {"calculate_hashes": False}, + False, + True, ), # Turned off by config. - (SWITCH_PLATFORM, "Game.nsp", {"extract_title_ids": False}), + (SWITCH_PLATFORM, "Game.nsp", True, False), # An archive holds no ROM binary sigil can read. - (SWITCH_PLATFORM, "game.zip", {}), + (SWITCH_PLATFORM, "game.zip", True, True), ], ) async def test_extraction_is_skipped( @@ -1735,7 +1736,8 @@ class TestSigilTitleIdExtraction: sigil_config: Config, platform: Platform, fs_name: str, - kwargs: dict[str, bool], + calculate_hashes: bool, + extract_title_ids: bool, ): handler = make_sigil_handler(tmp_path) rom = make_single_file_rom(tmp_path, platform, fs_name) @@ -1743,7 +1745,11 @@ class TestSigilTitleIdExtraction: mock_extract = AsyncMock() with patch(SIGIL_PATCH_TARGET, mock_extract): - parsed = await handler.get_rom_files(rom, **kwargs) + parsed = await handler.get_rom_files( + rom, + calculate_hashes=calculate_hashes, + extract_title_ids=extract_title_ids, + ) mock_extract.assert_not_awaited() assert parsed.title_id is None