优化详情调试标注与截图复用
This commit is contained in:
1 parent
42aa0f214d
commit
3bcb5cb259
6 files changed
+169
-42
No files matched your search
@@ -209,7 +209,7 @@ class TestPixelStage:
|
||||
assert not (debug_dir / "20260603_像素检测_抽奖结果_检测前.png").exists()
|
||||
assert not (debug_dir / "20260603_px_attend_pre.png").exists()
|
||||
|
||||
def test_pixel_stage_overview_does_not_draw_failed_candidate_boxes(self, tmp_path, monkeypatch):
|
||||
def test_pixel_stage_overview_draws_candidate_boxes(self, tmp_path, monkeypatch):
|
||||
from douyin.detection.pixel.stage import _save_pixel_stage_overview
|
||||
|
||||
debug_dir = tmp_path / "debug"
|
||||
@@ -259,9 +259,10 @@ class TestPixelStage:
|
||||
|
||||
assert saved_images
|
||||
overview = saved_images[0]
|
||||
# Old failed candidate boxes used to draw red outlines here.
|
||||
assert overview.getpixel((10, 1173)) != (255, 70, 70)
|
||||
assert overview.getpixel((250, 1261)) != (255, 70, 70)
|
||||
# Candidate boxes are visible again: red means checked but not matched.
|
||||
assert overview.getpixel((9, 1173)) == (255, 70, 70)
|
||||
assert overview.getpixel((290, 1300)) == (255, 70, 70)
|
||||
assert overview.getpixel((200, 300)) != (255, 70, 70)
|
||||
# Successful live-room icon detection is still annotated.
|
||||
assert overview.getpixel((1002, 172)) == (0, 220, 80)
|
||||
|
||||
|
||||
Reference in new issue
Block a user