# Testing signals — harry0703/MoneyPrinterTurbo

> Canonical page: https://codevetter.com/unpack/moneyprinterturbo/testing-signals

# Testing signals — harry0703/MoneyPrinterTurbo

Scanned commit 3d5f4e421927d61f3eac729cf4b711ac0b69d688 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Testing is unusually thorough for this genre: ~70 test files under test/ mixing pytest functions and unittest.TestCase, executed by pytest in CI on Python 3.11 and 3.13 with a real Redis service, plus a Windows smoke job. Branch coverage over app/, cli.py, main.py, webui/, and docs/skill/ is gated at ≥70%. Ruff lint runs in CI (3.11 only) and compileall checks every source tree. Live provider calls are opt-in via MPT_RUN_INTEGRATION_TESTS, so CI coverage is unit/integration-level with mocks rather than true end-to-end renders.
- Test layout: test/test_main.py plus ~70 files under test/services/ named test_<domain>.py (task, task_manager, cli, controllers, voice, video, material, providers, webui_* helpers); test/README.md documents the pytest commands and conventions. — [test/README.md](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/README.md) [test/services/test_task.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_task.py) [test/test_main.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/test_main.py)
- CI (.github/workflows/ci.yml) runs on ubuntu-latest across Python 3.11 and 3.13 with a redis:7-alpine service (MPT_TEST_REDIS_HOST/PORT/DB env), installs via `uv sync --frozen`, compiles all sources, ruff-checks on 3.11, and runs `coverage run -m pytest -q test`. — [.github/workflows/ci.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/.github/workflows/ci.yml)
- Coverage gate: [tool.coverage] uses branch=true over source=['app','cli','webui','main','docs/skill'] with fail_under=70 — the comment notes measured branch coverage exceeds 70.4% on both Python versions. — [pyproject.toml#L58-72](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/pyproject.toml#L58-L72)
- A windows-latest smoke job runs a curated subset (test_config, test_state, test_task, test_task_manager, test_upload_post, test_controller_video, test_webui_task, test_webui_headless_task_actions) — implying the full suite is not guaranteed Windows-clean. — [.github/workflows/ci.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/.github/workflows/ci.yml)
- test/services/test_cli.py (~106 test functions) and test/services/test_task.py (~62) are the largest suites, covering CLI arg validation, manifest handling, and pipeline stage behavior — consistent with cli.py and task.py being the most defect-sensitive surfaces. — [test/services/test_cli.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_cli.py) [test/services/test_task.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_task.py)
- Security behavior is directly tested: test_api_authentication.py, test_asgi_cors.py, and test_asgi_static_files.py exercise the x-api-key check, Origin rejection middleware, and /tasks static-mount protection. — [test/services/test_api_authentication.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_api_authentication.py) [test/services/test_asgi_cors.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_asgi_cors.py) [test/services/test_asgi_static_files.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_asgi_static_files.py)
- test_main.py verifies the uvicorn entrypoint wiring by mocking uvicorn.run and asserting host/port/reload/log_level — entrypoint correctness without binding a socket. — [test/test_main.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/test_main.py)
- Live provider tests are skipped by default and gated behind MPT_RUN_INTEGRATION_TESTS=1 with real credentials, per test/README.md — so provider adapters (LLM/TTS/material APIs) are largely exercised through mocks. — [test/README.md#L40-42](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/README.md#L40-L42)
- Redis-specific behavior (atomic patch_task Lua semantics, stale-queue-entry dropping, state recovery) is covered by test_state.py, test_task_manager.py, and friends that run against the CI Redis service. — [test/services/test_state.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_state.py) [test/services/test_task_manager.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_task_manager.py) [app/controllers/manager/redis_manager.py#L50-130](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/controllers/manager/redis_manager.py#L50-L130)
- WebUI internals are tested headlessly: ~20 test_webui_*.py files cover settings transfer, task history, log streaming, provider dropdowns, and i18n — but nothing renders an actual browser or end-to-end ffmpeg video in CI. (inferred) — [test/services/test_webui_task.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_webui_task.py) [test/services/test_webui_startup.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_webui_startup.py) [test/services/test_webui_i18n.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/test/services/test_webui_i18n.py)
- Lint scope: ruff checks app, cli.py, main.py, webui, test, docs/skill with a per-file ignore for E402 in webui/Main.py (the sys.path insertion must precede app imports). — [pyproject.toml#L54-56](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/pyproject.toml#L54-L56) [.github/workflows/ci.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/.github/workflows/ci.yml)
- Release pipeline is separate: .github/workflows/docker-ghcr.yml builds multi-arch Docker images to ghcr.io/harry0703/moneyprinterturbo on pushes to main, v* tags, and dispatch — tests do not gate image publication beyond sharing the same push. — [.github/workflows/docker-ghcr.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/.github/workflows/docker-ghcr.yml)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
