test: isolate region overrides in ui checks
This commit is contained in:
1 parent
4797fa046e
commit
ca7d64d54b
2 files changed
+6
-1
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user