Three-level end-to-end suite, all deterministic (no retries, no sleeps, no unmocked network): - tests/e2e/api (209 tests): every route in clipwright/api/app.py + free_tools — health/config, uploads, process submit matrix + worker/webhook/ auto-retry/resume, status/source/download-all, edit/effects, transcript/EDL/ rerender, scenes/reframe, subtitle, hook, Postiz, thumbnails, free tools, and the security/path guards. - tests/e2e/pipeline (136 tests): every stage with real ffmpeg and stubbed Gemini/yt-dlp/ASR/ML — download, transcribe, scene detect, selection, layout, reframe/render, subtitles, hooks, watermark, thumbnails, plus the real CLI full pipeline via stub_env. - dashboard/e2e (19 Playwright specs): route-interception state machine covering every dashboard flow; one real-backend spec left test.fixme. - Foundation: tests/e2e/conftest.py (state isolation, no-network guard, ffmpeg media factory, disk-seeded jobs), FakePopen worker harness, child-process stub_env, architecture-consistent fixtures. - CI: unit + backend-e2e + dashboard-e2e jobs in the python+node container; ffmpeg + Playwright installed in-job; no setup-node/cache (act runner). Verified: unit 790 passed; API E2E 209 passed; pipeline E2E 136 passed; Playwright 19 passed / 1 skipped.
41 lines
1.7 KiB
TOML
41 lines
1.7 KiB
TOML
# The backend is not packaged or published: it runs from a bind-mounted source
|
|
# tree (docker-compose.yml) and `requirements.txt` is the single runtime
|
|
# dependency source for the Docker image. This file therefore carries tool
|
|
# configuration only — no [build-system] and no [project] table — which also
|
|
# avoids colliding with the published `clipwright` CLI distribution under
|
|
# `cli/`.
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "7.0"
|
|
testpaths = ["tests"]
|
|
# Makes the repo-root `clipwright/` package importable without a sys.path hack
|
|
# in tests/conftest.py.
|
|
pythonpath = ["."]
|
|
# E2E taxonomy. The fast unit suite (`tests/test_*.py`) is selected with
|
|
# `-m "not e2e"`; the E2E lanes live under `tests/e2e/` and mark themselves.
|
|
# `ml` gates the heavy ML stack (torch/ultralytics/mediapipe/faster-whisper).
|
|
markers = [
|
|
"e2e: end-to-end tests, run separately from the fast unit suite",
|
|
"pipeline: end-to-end tests that exercise the pipeline stages",
|
|
"ml: tests that need the heavy ML stack (see requirements-ml-e2e.txt)",
|
|
]
|
|
# Safe: `grep -rn "async def test_" tests/` found no existing async tests, so
|
|
# auto mode does not change the behaviour of the unit suite. pytest-timeout is
|
|
# passed on the CI command line (`--timeout=120`) instead of an ini key so the
|
|
# thin unit environment (which may lack pytest-timeout) still collects.
|
|
asyncio_mode = "auto"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
extend-exclude = [
|
|
"dashboard",
|
|
"cli",
|
|
"output",
|
|
"uploads",
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
# Correctness only for now: keep this migration reviewable. Style/import rules
|
|
# can be ratcheted later without conflicting with the structural change.
|
|
select = ["E4", "E7", "E9", "F"]
|