diff --git a/tests/test_detection_pixel.py b/tests/test_detection_pixel.py index 15ec308..ec2a984 100644 --- a/tests/test_detection_pixel.py +++ b/tests/test_detection_pixel.py @@ -237,6 +237,7 @@ class TestPixelStage: def test_pixel_stage_overview_draws_candidate_boxes(self, tmp_path, monkeypatch): from douyin.detection.pixel.stage import _save_pixel_stage_overview + from douyin.fudai.core import coords as coords_mod debug_dir = tmp_path / "debug" debug_dir.mkdir() @@ -258,6 +259,7 @@ class TestPixelStage: "douyin.handlers.douyin_screenshot_manager.save_debug_image", fake_save_debug_image, ) + monkeypatch.setattr(coords_mod, "_read_runtime_region_config", lambda: {}) image = Image.new("RGB", (1080, 2400), (20, 20, 20)) _save_pixel_stage_overview( diff --git a/tests/test_fudai_detail_ui_v2.py b/tests/test_fudai_detail_ui_v2.py index f63b1a0..f19761e 100644 --- a/tests/test_fudai_detail_ui_v2.py +++ b/tests/test_fudai_detail_ui_v2.py @@ -6,7 +6,8 @@ from types import SimpleNamespace from PIL import Image -def test_v2_profile_keeps_legacy_and_adds_expected_regions(): +def test_v2_profile_keeps_legacy_and_adds_expected_regions(monkeypatch): + from douyin.fudai.core import coords as coords_mod from douyin.fudai.core.coords import ( DETAIL_UI_LEGACY, DETAIL_UI_V2_0, @@ -14,6 +15,8 @@ def test_v2_profile_keeps_legacy_and_adds_expected_regions(): get_fudai_detail_profile, ) + monkeypatch.setattr(coords_mod, "_read_runtime_region_config", lambda: {}) + legacy = get_fudai_detail_profile("legacy") v2 = get_fudai_detail_profile("v2_0", task_count=2) auto = get_fudai_detail_profile("auto", task_count=2)