← Files AgentBrokoARCHIVED FILE
tests/test_captions.py
420 Bytes · Sep 30, 2026 · 23:15 UTC
from video_forge.captions import text_to_srt
def test_text_to_srt(tmp_path):
output = tmp_path / "captions.srt"
text_to_srt("one two three four five", output, words_per_caption=3, seconds_per_caption=2)
content = output.read_text(encoding="utf-8")
assert "00:00:00,000 --> 00:00:02,000" in content
assert "one two three" in content
assert "00:00:02,000 --> 00:00:04,000" in content
SHA-256: df0c4dfe23b29d1208bcd10e6c34977214d66c020a4e4fec959d9a6319766aa4