diff --git a/tests/unit/test_editor_clips_random_start.py b/tests/unit/test_editor_clips_random_start.py index 1b28c38e7..d3fb9a1ee 100644 --- a/tests/unit/test_editor_clips_random_start.py +++ b/tests/unit/test_editor_clips_random_start.py @@ -144,6 +144,7 @@ class TestEditorClipsBySegments: # 验证均衡分配(贪心策略保证):2个素材分4个片段,每个素材恰好使用2次 from collections import Counter + asset_ids = [c["asset_id"] for c in clips_data] counts = Counter(asset_ids) assert counts["a1"] == 2 and counts["a2"] == 2 diff --git a/tests/unit/test_mediakit_smart_clips.py b/tests/unit/test_mediakit_smart_clips.py index 4f19ca234..edf3d18a6 100644 --- a/tests/unit/test_mediakit_smart_clips.py +++ b/tests/unit/test_mediakit_smart_clips.py @@ -477,6 +477,7 @@ class TestFromAssetsByTemplateSegments: asset_ids = [c["asset_id"] for c in clips_data] # 贪心分配保证均衡:2个素材分4个片段,每个素材恰好使用2次 from collections import Counter + counts = Counter(asset_ids) assert counts["a1"] == 2 and counts["a2"] == 2