Repository navigation
test: add pytest suite with coverage reporting in CI - #50
Merged
Merged
Conversation
77 tests covering script parsing, timing, project build, narration caching/alignment (with a fake TTS engine), captions, chapters, the ElevenLabs retry logic and the new/status/sync/music/install-skill commands. A regression test checks the demo episode's committed timing.json still follows from its script and narration. pytest + pytest-cov in a dev dependency group; coverage config and a 74% fail_under floor in pyproject.toml. CI runs the suite on Python 3.12 and 3.13, writes the coverage table to the run summary and uploads coverage.xml + HTML as an artifact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JoeMountWSWS
added a commit
that referenced
this pull request
Oct 25, 2026
77 tests covering script parsing, timing, project build, narration caching/alignment (with a fake TTS engine), captions, chapters, the ElevenLabs retry logic and the new/status/sync/music/install-skill commands. A regression test checks the demo episode's committed timing.json still follows from its script and narration. pytest + pytest-cov in a dev dependency group; coverage config and a 74% fail_under floor in pyproject.toml. CI runs the suite on Python 3.12 and 3.13, writes the coverage table to the run summary and uploads coverage.xml + HTML as an artifact. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the repo's first automated test suite, with coverage reporting locally and in CI.
tests/: 77 pytest tests (~1s, no network) covering:script.py: scenes, notes, cues, pauses, paragraph gaps, every parse errorbuild.py: frame-accurate timing, reel/landscape, scene stubs, timing injection that keeps edited scenes,index.html, music bed, licensed-font@font-facevoice.py: respelling, voice blends, sentence/clause grouping, alignment interpolation, engine selection, ElevenLabs retry/error handling, and the fullvoice_allcache + align path via a fake TTS enginerender.py: SRT grouping/line-breaking, burned-in ASS captions (incl. the DINPro ligature workaround), chapters and YouTube rule warningsnew,status,sync,music(cached),install-skilldemo-paris-commune's committedtiming.jsonmust be reproducible from its script andwords.jsonpyproject.toml:devdependency group (pytest, pytest-cov);[tool.pytest.ini_options]and[tool.coverage](branch coverage,fail_under = 74;chatterbox_worker.pyomitted since it runs in its own venv); ruff isort marksstudio/conftestfirst-partyTestsjob on Python 3.12 + 3.13; the coverage table goes to the run summary, andcoverage.xml+ HTML are uploaded as thecoverageartifact. Ruff now also lintstests/, andtests/**triggers CIdocs/contributing.mdand a pointer inAGENTS.mdCoverage
75.4% total (branch).
build100%,music100%,script97%,skill96%,common94%,voice68%,cli64%,render57%. The uncovered code is mostly the real Kokoro/Chatterbox/ElevenLabs engines and the ffmpeg/HyperFrames render-and-mix path, which need models and binaries CI doesn't install.Notes
upload-artifact@v4is pinned; Dependabot (github-actions) will bump it.demo-*episode is used as a fixture, so the tests don't depend on real episodes moving to the private workspace.Test plan
uv run pytestpasses on 3.12 and 3.13 locallyuvx ruff@0.17.0 check tools/ tests/,uv lock --checkmkdocs build --strict🤖 Generated with Claude Code