Add pytest suite and CI (roadmap A1)
37 headless tests covering the logic that is cheap to break: - split planner: plan_disc_split, chapter helpers (whole-fit, multi-disc partition, single-movie chapter/even-cut split, contiguous coverage) - High-profile fill-disc bitrate math (disc count + bounds + capacity) - ffmpeg command generation: profiles, text/image hardsub, 2-pass, nice, progress-to-file, even pad/crop + positive offsets, -ss seek, and the AC3 448k audio-clamp regression - ffprobe subtitle detection: text/image classification, tags/disposition tests/conftest.py makes the in-tree package importable and installs the gettext _ builtin so modules run headless. Forgejo Actions workflow runs the suite on push/PR. Update CLAUDE.md's testing section accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b5a6cfe25f
commit
691664095b
9 changed files with 559 additions and 8 deletions
28
.forgejo/workflows/tests.yml
Normal file
28
.forgejo/workflows/tests.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: debian:bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
# PyGObject + GTK introspection are needed because the modules under
|
||||
# test import gi.repository at import time; the tests themselves run
|
||||
# headless (no display, no encoding).
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip python3-gi gir1.2-gtk-3.0 \
|
||||
python3-cairo python3-gi-cairo
|
||||
pip3 install --break-system-packages pytest
|
||||
|
||||
- name: Run test suite
|
||||
run: python3 -m pytest
|
||||
Loading…
Add table
Add a link
Reference in a new issue