feat(pipeline): runner + opt-in integration test on real forest base (content pipeline §3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
BenStullsBets
2026-06-24 08:01:25 -07:00
parent 60d27aa662
commit 38a1046433
2 changed files with 74 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import shutil
import subprocess
from pathlib import Path
import pytest
from tools.pipeline.run import process_clip
_HAS_FF = shutil.which("ffmpeg") is not None and shutil.which("ffprobe") is not None
_FOREST = Path("simulator/sample_media/forest/base.mp4")
@pytest.mark.skipif(not _HAS_FF, reason="ffmpeg/ffprobe not installed")
@pytest.mark.skipif(not _FOREST.exists(),
reason="forest POC base absent (run simulator/setup_sample_media.py)")
def test_process_clip_emits_proxy_and_master(tmp_path):
out = process_clip(_FOREST, tmp_path, overlap=0.5, start=0.0, duration=4.0)
assert out["proxy"].exists() and out["master"].exists()
# Proxy is exactly 1920x1080.
probe = subprocess.run(
["ffprobe", "-v", "quiet", "-select_streams", "v:0",
"-show_entries", "stream=width,height", "-of", "csv=p=0", str(out["proxy"])],
capture_output=True, text=True, check=True,
).stdout.strip()
assert probe == "1920,1080"